Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Rodriguez committed May 12, 2017
1 parent 5820fad commit 0820638
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# ajax-datatables-rails

[![GitHub license](https://img.shields.io/github/license/jbox-web/ajax-datatables-rails.svg)](https://github.com/jbox-web/ajax-datatables-rails/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/jbox-web/ajax-datatables-rails.svg)](https://github.com/jbox-web/ajax-datatables-rails/releases/latest)
[![Gem](https://img.shields.io/gem/v/ajax-datatables-rails.svg)](https://rubygems.org/gems/ajax-datatables-rails)
[![Gem](https://img.shields.io/gem/dtv/ajax-datatables-rails.svg)](https://rubygems.org/gems/ajax-datatables-rails)
[![Build Status](https://travis-ci.org/jbox-web/ajax-datatables-rails.svg?branch=master)](https://travis-ci.org/jbox-web/ajax-datatables-rails)
Expand All @@ -13,7 +12,12 @@
>
> This gem is targeted at Datatables version 1.10.x.
>
> It's tested against Rails 4.2.8 / 5.0.2 / 5.1.0 and Ruby 2.2.7 / 2.3.4 / 2.4.1
> It's tested against :
> * Rails 4.2.8 / 5.0.2 / 5.1.0
> * Ruby 2.2.7 / 2.3.4 / 2.4.1
> * Postgresql
> * MySQL
> * SQLite
## Description

Expand Down Expand Up @@ -547,6 +551,10 @@ So, now inside your class code, you can use those options like this:

```ruby
# let's see an example
def user
@user ||= options[:user]
end

def from
@from ||= options[:from].beginning_of_day
end
Expand All @@ -555,10 +563,6 @@ def to
@to ||= Date.today.end_of_day
end

def user
@user ||= options[:user]
end

def get_raw_records
user.messages.unresponded.where(received_at: from..to)
end
Expand Down

0 comments on commit 0820638

Please sign in to comment.