Skip to content

Commit 5961ef3

Browse files
committed
Updates README and CHANGELOG to prepare for point release
1 parent a0e69e1 commit 5961ef3

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# CHANGELOG
22

3-
## 0.3.0 (unreleased yet)
3+
## 0.3.1
4+
* Adds `:oracle` as supported `db_adapter`. Thanks to [lutechspa](https://github.com/lutechspa) for this contribution.
5+
6+
## 0.3.0
47
* Changes to the `sortable_columns` and `searchable_columns` syntax as it
58
required us to do unnecessary guessing. New syntax is `ModelName.column_name`
69
or `Namespace::ModelName.column_name`. Old syntax of `table_name.column_name`

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ manually via the assets pipeline. If you decide to use the
6565
`jquery-datatables-rails` gem, please refer to its installation instructions
6666
[here](https://github.com/rweng/jquery-datatables-rails).
6767

68-
## Usage (0.3.0)
68+
## Usage (0.3.x)
6969
*The following examples assume that we are setting up ajax-datatables-rails for
7070
an index of users from a `User` model, and that we are using postgresql as
7171
our db, because you __should be using it__, if not, please refer to the
@@ -142,7 +142,7 @@ def data
142142
end
143143
```
144144

145-
This method builds a 2d array that is used by datatables to construct the html
145+
This method builds a 2D array that is used by datatables to construct the html
146146
table. Insert the values you want on each column.
147147

148148
```ruby
@@ -163,12 +163,12 @@ column must be a sortable column. For more, see
163163
[this issue](https://github.com/antillas21/ajax-datatables-rails/issues/83).
164164

165165
[See here](#using-view-helpers) if you need to use view helpers in the
166-
returned 2d array, like `link_to`, `mail_to`, `resource_path`, etc.
166+
returned 2D array, like `link_to`, `mail_to`, `resource_path`, etc.
167167

168168
#### Automatic addition of ID
169-
If you want the gem inserts automatically the ID of the record in the tr element
169+
If you want the gem inserts automatically the ID of the record in the `<tr>` element
170170
as shown in this [DataTable axample](http://www.datatables.net/examples/server_side/ids.html),
171-
you have to perform some modifications in both SomeNameDatatable.rb file and in your javascript.
171+
you have to perform some modifications in both `some_datatable.rb` file and in your javascript.
172172

173173
Here is an example:
174174
```ruby
@@ -468,6 +468,10 @@ end
468468

469469
Pretty much like you would do it, if you were inside a namespaced controller.
470470

471+
#### What if I'm using Oracle?
472+
473+
We have recently merged and released a contribution from [lutechspa](https://github.com/lutechspa) that makes this gem work with Oracle (tested in version 11g). You can [take a look at this sample repo](https://github.com/paoloripamonti/oracle-ajax-datatable) to get an idea on how to set things up.
474+
471475
#### Searching on non text-based columns
472476

473477
It always comes the time when you need to add a non-string/non-text based
@@ -476,8 +480,8 @@ these column types (example: numeric, date, time).
476480

477481
We recently added the ability to (automatically) typecast these column types
478482
and have this scenario covered. Please note however, if you are using
479-
something different from `postgresql` (with the `:pg` gem), like `mysql` or
480-
`sqlite`, then you need to add an initializer in your application's
483+
something different from `postgresql` (with the `:pg` gem), like `oracle`,
484+
`mysql` or `sqlite`, then you need to add an initializer in your application's
481485
`config/initializers` directory.
482486

483487
If you don't perform this step (again, if using something different from
@@ -503,7 +507,7 @@ with the following content:
503507

504508
```ruby
505509
AjaxDatatablesRails.configure do |config|
506-
# available options for db_adapter are: :pg, :mysql2, :sqlite3
510+
# available options for db_adapter are: :oracle, :pg, :mysql2, :sqlite3
507511
# config.db_adapter = :pg
508512

509513
# available options for paginator are: :simple_paginator, :kaminari, :will_paginate

lib/generators/datatable/templates/ajax_datatables_rails_config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AjaxDatatablesRails.configure do |config|
22
# available options for db_adapter are: :oracle, :pg, :mysql2, :sqlite3
3-
# config.db_adapter = :oracle
3+
# config.db_adapter = :pg
44

55
# available options for paginator are: :simple_paginator, :kaminari, :will_paginate
66
# config.paginator = :simple_paginator

0 commit comments

Comments
 (0)