Skip to content

Commit 0820638

Browse files
author
Nicolas Rodriguez
committed
Update README
1 parent 5820fad commit 0820638

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# ajax-datatables-rails
22

33
[![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)
4-
[![GitHub release](https://img.shields.io/github/release/jbox-web/ajax-datatables-rails.svg)](https://github.com/jbox-web/ajax-datatables-rails/releases/latest)
54
[![Gem](https://img.shields.io/gem/v/ajax-datatables-rails.svg)](https://rubygems.org/gems/ajax-datatables-rails)
65
[![Gem](https://img.shields.io/gem/dtv/ajax-datatables-rails.svg)](https://rubygems.org/gems/ajax-datatables-rails)
76
[![Build Status](https://travis-ci.org/jbox-web/ajax-datatables-rails.svg?branch=master)](https://travis-ci.org/jbox-web/ajax-datatables-rails)
@@ -13,7 +12,12 @@
1312
>
1413
> This gem is targeted at Datatables version 1.10.x.
1514
>
16-
> 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
15+
> It's tested against :
16+
> * Rails 4.2.8 / 5.0.2 / 5.1.0
17+
> * Ruby 2.2.7 / 2.3.4 / 2.4.1
18+
> * Postgresql
19+
> * MySQL
20+
> * SQLite
1721
1822
## Description
1923

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

548552
```ruby
549553
# let's see an example
554+
def user
555+
@user ||= options[:user]
556+
end
557+
550558
def from
551559
@from ||= options[:from].beginning_of_day
552560
end
@@ -555,10 +563,6 @@ def to
555563
@to ||= Date.today.end_of_day
556564
end
557565

558-
def user
559-
@user ||= options[:user]
560-
end
561-
562566
def get_raw_records
563567
user.messages.unresponded.where(received_at: from..to)
564568
end

0 commit comments

Comments
 (0)