ajax-datatables-rails 0.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.codeclimate.yml +8 -0
- data/.github/workflows/ci.yml +128 -0
- data/.gitignore +23 -0
- data/.rspec +1 -0
- data/.rubocop.yml +58 -0
- data/Appraisals +28 -0
- data/CHANGELOG.md +102 -7
- data/Gemfile +4 -1
- data/Guardfile +16 -0
- data/LICENSE +17 -18
- data/README.md +595 -404
- data/Rakefile +4 -2
- data/ajax-datatables-rails.gemspec +41 -25
- data/appraisal.yml +56 -0
- data/bin/_guard-core +29 -0
- data/bin/appraisal +29 -0
- data/bin/bundle +114 -0
- data/bin/guard +29 -0
- data/bin/rackup +27 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/config.ru +7 -0
- data/doc/migrate.md +97 -0
- data/doc/webpack.md +55 -0
- data/gemfiles/rails_5.2.8.gemfile +21 -0
- data/gemfiles/rails_6.0.6.gemfile +21 -0
- data/gemfiles/rails_6.1.7.gemfile +21 -0
- data/gemfiles/rails_7.0.4.gemfile +21 -0
- data/lib/ajax-datatables-rails/active_record.rb +7 -0
- data/lib/ajax-datatables-rails/base.rb +114 -149
- data/lib/ajax-datatables-rails/datatable/column/date_filter.rb +68 -0
- data/lib/ajax-datatables-rails/datatable/column/order.rb +29 -0
- data/lib/ajax-datatables-rails/datatable/column/search.rb +125 -0
- data/lib/ajax-datatables-rails/datatable/column.rb +123 -0
- data/lib/ajax-datatables-rails/datatable/datatable.rb +91 -0
- data/lib/ajax-datatables-rails/datatable/simple_order.rb +59 -0
- data/lib/ajax-datatables-rails/datatable/simple_search.rb +23 -0
- data/lib/ajax-datatables-rails/datatable.rb +6 -0
- data/lib/ajax-datatables-rails/error.rb +9 -0
- data/lib/ajax-datatables-rails/orm/active_record.rb +60 -0
- data/lib/ajax-datatables-rails/orm.rb +6 -0
- data/lib/ajax-datatables-rails/version.rb +15 -1
- data/lib/ajax-datatables-rails.rb +11 -7
- data/lib/generators/rails/datatable_generator.rb +11 -22
- data/lib/generators/rails/templates/datatable.rb +13 -15
- data/spec/ajax-datatables-rails/base_spec.rb +223 -0
- data/spec/ajax-datatables-rails/datatable/column_spec.rb +222 -0
- data/spec/ajax-datatables-rails/datatable/datatable_spec.rb +127 -0
- data/spec/ajax-datatables-rails/datatable/simple_order_spec.rb +62 -0
- data/spec/ajax-datatables-rails/datatable/simple_search_spec.rb +19 -0
- data/spec/ajax-datatables-rails/orm/active_record_filter_records_spec.rb +639 -0
- data/spec/ajax-datatables-rails/orm/active_record_paginate_records_spec.rb +67 -0
- data/spec/ajax-datatables-rails/orm/active_record_sort_records_spec.rb +80 -0
- data/spec/dummy/app/assets/config/manifest.js +0 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config/storage.yml +3 -0
- data/spec/dummy/db/schema.rb +13 -0
- data/spec/dummy/log/.gitignore +1 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories/user.rb +11 -0
- data/spec/install_oracle.sh +18 -0
- data/spec/spec_helper.rb +85 -6
- data/spec/support/datatables/complex_datatable.rb +33 -0
- data/spec/support/datatables/complex_datatable_array.rb +16 -0
- data/spec/support/datatables/datatable_cond_date.rb +7 -0
- data/spec/support/datatables/datatable_cond_numeric.rb +53 -0
- data/spec/support/datatables/datatable_cond_proc.rb +13 -0
- data/spec/support/datatables/datatable_cond_string.rb +43 -0
- data/spec/support/datatables/datatable_cond_unknown.rb +7 -0
- data/spec/support/datatables/datatable_custom_column.rb +17 -0
- data/spec/support/datatables/datatable_order_nulls_last.rb +7 -0
- data/spec/support/helpers/params.rb +80 -0
- data/spec/support/models/user.rb +7 -0
- metadata +249 -48
- data/lib/ajax-datatables-rails/config.rb +0 -25
- data/lib/ajax-datatables-rails/extensions/kaminari.rb +0 -12
- data/lib/ajax-datatables-rails/extensions/simple_paginator.rb +0 -12
- data/lib/ajax-datatables-rails/extensions/will_paginate.rb +0 -12
- data/lib/ajax-datatables-rails/models.rb +0 -6
- data/lib/generators/datatable/config_generator.rb +0 -17
- data/lib/generators/datatable/templates/ajax_datatables_rails_config.rb +0 -7
- data/spec/ajax-datatables-rails/ajax_datatables_rails_spec.rb +0 -351
- data/spec/ajax-datatables-rails/kaminari_spec.rb +0 -35
- data/spec/ajax-datatables-rails/models_spec.rb +0 -10
- data/spec/ajax-datatables-rails/simple_paginator_spec.rb +0 -32
- data/spec/ajax-datatables-rails/will_paginate_spec.rb +0 -28
- data/spec/schema.rb +0 -35
- data/spec/test_models.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a8603311c92aa4db99c7b94103de8ed606a61ffafaf630724517d479cd478331
|
4
|
+
data.tar.gz: 2baccc608a73493ecb7c28570075a9dda5919c91010db322e98a9c8d7032b4be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2097c47d5af467755b87bd09abe9551b1eeb6334476358508bc4615657b66c0ae2b38b7a4416475e3783f3e88f99d35be984c6c9a9e55e6ded40ee382f2ffbe
|
7
|
+
data.tar.gz: 4fbbaf7373f5acb5548ff354e5d191e195598302756e6051bd37a2876fee4e4f8450d3b535c7e98fd5654923740286d6c67b29d4570868d816200e7568cf2ecc
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
---
|
2
|
+
name: CI
|
3
|
+
|
4
|
+
on:
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- '**'
|
8
|
+
pull_request:
|
9
|
+
branches:
|
10
|
+
- '**'
|
11
|
+
schedule:
|
12
|
+
- cron: '0 4 1 * *'
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
rspec:
|
16
|
+
runs-on: ubuntu-20.04
|
17
|
+
|
18
|
+
env:
|
19
|
+
ORACLE_COOKIE: sqldev
|
20
|
+
ORACLE_FILE: oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
|
21
|
+
ORACLE_HOME: /u01/app/oracle/product/11.2.0/xe
|
22
|
+
ORACLE_SID: XE
|
23
|
+
|
24
|
+
services:
|
25
|
+
postgres:
|
26
|
+
image: 'postgres:13'
|
27
|
+
ports: ['5432:5432']
|
28
|
+
env:
|
29
|
+
POSTGRES_PASSWORD: postgres
|
30
|
+
POSTGRES_DB: ajax_datatables_rails
|
31
|
+
options: >-
|
32
|
+
--health-cmd pg_isready
|
33
|
+
--health-interval 10s
|
34
|
+
--health-timeout 5s
|
35
|
+
--health-retries 5
|
36
|
+
|
37
|
+
# Using docker image fails with
|
38
|
+
# invalid reference format
|
39
|
+
# mariadb:
|
40
|
+
# image: 'mariadb:10.3'
|
41
|
+
# ports: ['3306:3306']
|
42
|
+
# env:
|
43
|
+
# MYSQL_ROOT_PASSWORD: root
|
44
|
+
# MYSQL_DATABASE: ajax_datatables_rails
|
45
|
+
# options: >-
|
46
|
+
# --health-cmd 'mysqladmin ping'
|
47
|
+
# --health-interval 10s
|
48
|
+
# --health-timeout 5s
|
49
|
+
# --health-retries 3
|
50
|
+
|
51
|
+
strategy:
|
52
|
+
fail-fast: false
|
53
|
+
matrix:
|
54
|
+
ruby:
|
55
|
+
- '3.1'
|
56
|
+
- '3.0'
|
57
|
+
- '2.7'
|
58
|
+
rails:
|
59
|
+
- rails_5.2.8
|
60
|
+
- rails_6.0.6
|
61
|
+
- rails_6.1.7
|
62
|
+
- rails_7.0.4
|
63
|
+
adapter:
|
64
|
+
- sqlite3
|
65
|
+
- postgresql
|
66
|
+
- mysql2
|
67
|
+
- oracle_enhanced
|
68
|
+
exclude:
|
69
|
+
- ruby: '3.0'
|
70
|
+
rails: rails_5.2.8
|
71
|
+
- ruby: '3.1'
|
72
|
+
rails: rails_5.2.8
|
73
|
+
|
74
|
+
steps:
|
75
|
+
- name: Checkout
|
76
|
+
uses: actions/checkout@v2
|
77
|
+
|
78
|
+
- name: Setup Ruby
|
79
|
+
uses: ruby/setup-ruby@v1
|
80
|
+
with:
|
81
|
+
ruby-version: ${{ matrix.ruby }}
|
82
|
+
|
83
|
+
- name: Set DB Adapter
|
84
|
+
env:
|
85
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
86
|
+
DB_ADAPTER: ${{ matrix.adapter }}
|
87
|
+
CUSTOM_ORACLE_FILE: ${{ secrets.CUSTOM_ORACLE_FILE }}
|
88
|
+
|
89
|
+
# See: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
|
90
|
+
run: |
|
91
|
+
if [ "${DB_ADAPTER}" = "mysql2" ]; then
|
92
|
+
sudo systemctl start mysql.service
|
93
|
+
mysql -u root -proot -e 'create database ajax_datatables_rails;'
|
94
|
+
fi
|
95
|
+
|
96
|
+
if [ "${DB_ADAPTER}" = "oracle_enhanced" ]; then
|
97
|
+
./spec/install_oracle.sh
|
98
|
+
# Fix error : libnnz11.so: cannot open shared object file: No such file or directory
|
99
|
+
sudo ln -s ${ORACLE_HOME}/lib/libnnz11.so /usr/lib/libnnz11.so
|
100
|
+
fi
|
101
|
+
|
102
|
+
- name: Setup Ruby cache
|
103
|
+
uses: actions/cache@v2
|
104
|
+
with:
|
105
|
+
path: vendor/bundle
|
106
|
+
key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.adapter }}-${{ hashFiles('**/Gemfile.lock') }}
|
107
|
+
restore-keys: |
|
108
|
+
${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.rails }}-${{ matrix.adapter }}-
|
109
|
+
|
110
|
+
- name: Bundle
|
111
|
+
env:
|
112
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
113
|
+
DB_ADAPTER: ${{ matrix.adapter }}
|
114
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
|
115
|
+
run: |
|
116
|
+
gem install bundler
|
117
|
+
bundle config path vendor/bundle
|
118
|
+
bundle install --jobs 4 --retry 3
|
119
|
+
|
120
|
+
- name: RSpec & publish code coverage
|
121
|
+
uses: paambaati/codeclimate-action@v2.7.5
|
122
|
+
env:
|
123
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
124
|
+
DB_ADAPTER: ${{ matrix.adapter }}
|
125
|
+
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile
|
126
|
+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
127
|
+
with:
|
128
|
+
coverageCommand: bin/rake
|
data/.gitignore
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Ignore bundler config.
|
2
|
+
/.bundle
|
3
|
+
|
4
|
+
# Ignore Gemfile.lock
|
5
|
+
/Gemfile.lock
|
6
|
+
/gemfiles/*.lock
|
7
|
+
/gemfiles/.bundle
|
8
|
+
|
9
|
+
# Ignore test files
|
10
|
+
/coverage
|
11
|
+
/tmp
|
12
|
+
|
13
|
+
# RVM files
|
14
|
+
/.ruby-version
|
15
|
+
|
16
|
+
# Gem files
|
17
|
+
/*.gem
|
18
|
+
|
19
|
+
# Ignore dummy app files
|
20
|
+
spec/dummy/db/*.sqlite3
|
21
|
+
spec/dummy/db/*.sqlite3-journal
|
22
|
+
spec/dummy/log/*.log
|
23
|
+
spec/dummy/tmp/
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
SuggestExtensions: false
|
4
|
+
TargetRubyVersion: 2.7
|
5
|
+
Exclude:
|
6
|
+
- bin/*
|
7
|
+
- lib/generators/**/*.rb
|
8
|
+
- gemfiles/*
|
9
|
+
- spec/**/*
|
10
|
+
|
11
|
+
Style/Documentation:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Layout/HashAlignment:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Layout/EmptyLines:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Layout/EmptyLinesAroundClassBody:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Layout/EmptyLinesAroundBlockBody:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Layout/EmptyLinesAroundModuleBody:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
Layout/EmptyLineBetweenDefs:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Metrics/CyclomaticComplexity:
|
33
|
+
Max: 7
|
34
|
+
|
35
|
+
Metrics/LineLength:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
Metrics/BlockLength:
|
39
|
+
Max: 30
|
40
|
+
|
41
|
+
Metrics/MethodLength:
|
42
|
+
Max: 15
|
43
|
+
|
44
|
+
Metrics/ClassLength:
|
45
|
+
Max: 130
|
46
|
+
|
47
|
+
Naming/AccessorMethodName:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Naming/FileName:
|
51
|
+
Exclude:
|
52
|
+
- lib/ajax-datatables-rails.rb
|
53
|
+
|
54
|
+
Style/TrailingCommaInArrayLiteral:
|
55
|
+
EnforcedStyleForMultiline: comma
|
56
|
+
|
57
|
+
Style/TrailingCommaInHashLiteral:
|
58
|
+
EnforcedStyleForMultiline: comma
|
data/Appraisals
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
rails_versions = YAML.load(File.read('appraisal.yml'))
|
6
|
+
|
7
|
+
rails_versions.each do |version, gems|
|
8
|
+
appraise "rails_#{version}" do
|
9
|
+
gem 'rails', version
|
10
|
+
gems.each do |name, opts|
|
11
|
+
if opts['install_if']
|
12
|
+
install_if opts['install_if'] do
|
13
|
+
if opts['version'].empty?
|
14
|
+
gem name
|
15
|
+
else
|
16
|
+
gem name, opts['version']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
else
|
20
|
+
if opts['version'].empty?
|
21
|
+
gem name
|
22
|
+
else
|
23
|
+
gem name, opts['version']
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,100 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
##
|
3
|
+
## 1.4.0 (2022-12-18)
|
4
|
+
|
5
|
+
* Improve tests
|
6
|
+
* Add tests on custom_field feature
|
7
|
+
* Drop support of Ruby 2.5
|
8
|
+
* Drop support of Ruby 2.6
|
9
|
+
* Add support of Ruby 3.1
|
10
|
+
* Add support of Rails 7
|
11
|
+
* Fix: prevent establishing ActiveRecord connection on startup
|
12
|
+
|
13
|
+
## 1.3.1 (2021-02-09)
|
14
|
+
|
15
|
+
* Fix rare case error `uninitialized constant AjaxDatatablesRails::ActiveRecord::Base` (merge: [#379](https://github.com/jbox-web/ajax-datatables-rails/pull/379))
|
16
|
+
|
17
|
+
## 1.3.0 (2021-01-04)
|
18
|
+
|
19
|
+
* Drop support of Rails 5.0.x and 5.1.x
|
20
|
+
* Drop support of Ruby 2.4
|
21
|
+
* Add support of Rails 6.1
|
22
|
+
* Add support of Ruby 3.0
|
23
|
+
* Switch from Travis to Github Actions
|
24
|
+
* Improve specs
|
25
|
+
* Fix lib loading with JRuby (fixes [#371](https://github.com/jbox-web/ajax-datatables-rails/issues/371))
|
26
|
+
* Raise an error when column's `cond:` setting is unknown
|
27
|
+
* Make global search and column search work together (merge: [#350](https://github.com/jbox-web/ajax-datatables-rails/pull/350), fixes: [#258](https://github.com/jbox-web/ajax-datatables-rails/issues/258))
|
28
|
+
* Fix: date_range doesn't support searching by a date greater than today (merge: [#351](https://github.com/jbox-web/ajax-datatables-rails/pull/351))
|
29
|
+
* Fix: undefined method `fetch' for nil:NilClass (fix: [#307](https://github.com/jbox-web/ajax-datatables-rails/issues/307))
|
30
|
+
* Add support for json params (merge: [#355](https://github.com/jbox-web/ajax-datatables-rails/pull/355))
|
31
|
+
|
32
|
+
* `AjaxDatatablesRails.config` is removed with no replacement. The gem is now configless :)
|
33
|
+
* `AjaxDatatablesRails.config.db_adapter=` is removed and is configured per datatable class now. It defaults to Rails DB adapter. (fixes [#364](https://github.com/jbox-web/ajax-datatables-rails/issues/364))
|
34
|
+
* `AjaxDatatablesRails.config.nulls_last=` is removed and is configured per datatable class now (or by column). It defaults to false.
|
35
|
+
|
36
|
+
To mitigate this 3 changes see the [migration doc](/doc/migrate.md).
|
37
|
+
|
38
|
+
## 1.2.0 (2020-04-19)
|
39
|
+
|
40
|
+
* Drop support of Rails 4.x
|
41
|
+
* Drop support of Ruby 2.3
|
42
|
+
* Use [zeitwerk](https://github.com/fxn/zeitwerk) to load gem files
|
43
|
+
* Add binstubs to ease development
|
44
|
+
|
45
|
+
This is the last version to support Rails 5.0.x, Rails 5.1.x and Ruby 2.4.x.
|
46
|
+
|
47
|
+
## 1.1.0 (2019-12-12)
|
48
|
+
|
49
|
+
* Add rudimentary support for Microsoft SQL Server
|
50
|
+
* Fixes errors when options[param] is nil [PR 315](https://github.com/jbox-web/ajax-datatables-rails/pull/315) (thanks @allard)
|
51
|
+
* Improve query performance when nulls_last option is enabled [PR 317](https://github.com/jbox-web/ajax-datatables-rails/pull/317) (thanks @natebird)
|
52
|
+
* Add :string_in cond [PR 323](https://github.com/jbox-web/ajax-datatables-rails/pull/323) (thanks @donnguyen)
|
53
|
+
* Rename `sanitize` private method [PR 326](https://github.com/jbox-web/ajax-datatables-rails/pull/326) (thanks @epipheus)
|
54
|
+
* Update documentation
|
55
|
+
* Test with latest Rails (6.x) and Ruby versions (2.6)
|
56
|
+
|
57
|
+
This is the last version to support Rails 4.x and Ruby 2.3.x.
|
58
|
+
|
59
|
+
## 1.0.0 (2018-08-28)
|
60
|
+
|
61
|
+
* Breaking change: Remove dependency on view_context [Issue #288](https://github.com/jbox-web/ajax-datatables-rails/issues/288)
|
62
|
+
* Breaking change: Replace `config.orm = :active_record` by a class : `AjaxDatatablesRails::ActiveRecord` [Fix #228](https://github.com/jbox-web/ajax-datatables-rails/issues/228)
|
63
|
+
|
64
|
+
To mitigate this 2 changes see the [migration doc](/doc/migrate.md).
|
65
|
+
|
66
|
+
## 0.4.3 (2018-06-05)
|
67
|
+
|
68
|
+
* Add: Add `:string_eq` condition on columns filter [Issue #291](https://github.com/jbox-web/ajax-datatables-rails/issues/291)
|
69
|
+
|
70
|
+
**Note :** This is the last version to support Rails 4.0.x and Rails 4.1.x
|
71
|
+
|
72
|
+
## 0.4.2 (2018-05-15)
|
73
|
+
|
74
|
+
* Fix: Integer out of range [PR #289](https://github.com/jbox-web/ajax-datatables-rails/pull/289) from [PR #284](https://github.com/jbox-web/ajax-datatables-rails/pull/284)
|
75
|
+
|
76
|
+
## 0.4.1 (2018-05-06)
|
77
|
+
|
78
|
+
* Fix: Restore behavior of #filter method [Comment](https://github.com/jbox-web/ajax-datatables-rails/commit/07795fd26849ff1b3b567f4ce967f722907a45be#comments)
|
79
|
+
* Fix: Fix erroneous offset/start behavior [PR #264](https://github.com/jbox-web/ajax-datatables-rails/pull/264)
|
80
|
+
* Fix: "orderable" option has no effect [Issue #245](https://github.com/jbox-web/ajax-datatables-rails/issues/245)
|
81
|
+
* Fix: Fix undefined method #and [PR #235](https://github.com/jbox-web/ajax-datatables-rails/pull/235)
|
82
|
+
* Add: Add "order nulls last" option [PR #79](https://github.com/jbox-web/ajax-datatables-rails/pull/279)
|
83
|
+
* Change: Rename `additional_datas` method as `additional_data` [PR #251](https://github.com/jbox-web/ajax-datatables-rails/pull/251)
|
84
|
+
* Change: Added timezone support for daterange [PR #261](https://github.com/jbox-web/ajax-datatables-rails/pull/261)
|
85
|
+
* Change: Add # frozen_string_literal: true pragma
|
86
|
+
* Various improvements in internal API
|
87
|
+
|
88
|
+
## 0.4.0 (2017-05-21)
|
89
|
+
|
90
|
+
**Warning:** this version is a **major break** from v0.3. The core has been rewriten to remove dependency on Kaminari (or WillPaginate).
|
91
|
+
|
92
|
+
It also brings a new (more natural) way of defining columns, based on hash definitions (and not arrays) and add some filtering options for column search. Take a look at the [README](https://github.com/jbox-web/ajax-datatables-rails#customize-the-generated-datatables-class) for more infos.
|
93
|
+
|
94
|
+
## 0.3.1 (2015-07-13)
|
4
95
|
* Adds `:oracle` as supported `db_adapter`. Thanks to [lutechspa](https://github.com/lutechspa) for this contribution.
|
5
96
|
|
6
|
-
## 0.3.0
|
97
|
+
## 0.3.0 (2015-01-30)
|
7
98
|
* Changes to the `sortable_columns` and `searchable_columns` syntax as it
|
8
99
|
required us to do unnecessary guessing. New syntax is `ModelName.column_name`
|
9
100
|
or `Namespace::ModelName.column_name`. Old syntax of `table_name.column_name`
|
@@ -14,7 +105,7 @@
|
|
14
105
|
for this contribution.
|
15
106
|
* Moves paginator settings to configuration initializer.
|
16
107
|
|
17
|
-
## 0.2.1
|
108
|
+
## 0.2.1 (2014-11-26)
|
18
109
|
* Fix count method to work with select statements under Rails 4.1. Thanks to
|
19
110
|
[Jason Mitchell](https://github.com/mitchej123) for the contribution.
|
20
111
|
* Edits to `README` documentation about the `options` hash. Thanks to
|
@@ -32,22 +123,22 @@ text-based columns and perform searches depending on the use of `:mysql2`,
|
|
32
123
|
`:sqlite3` or `:pg`. Thanks to [M. Saiqul Haq](https://github.com/saiqulhaq)
|
33
124
|
for contributing this feature.
|
34
125
|
|
35
|
-
## 0.2.0
|
126
|
+
## 0.2.0 (2014-06-19)
|
36
127
|
* This version works with jQuery dataTables ver. 1.10 and it's new API syntax.
|
37
128
|
* Added `legacy` branch to repo. If your project is working with jQuery
|
38
129
|
dataTables ver. 1.9, this is the branch you need to pull, or use the last
|
39
130
|
`0.1.x` version of this gem.
|
40
131
|
|
41
|
-
## 0.1.2
|
132
|
+
## 0.1.2 (2014-06-18)
|
42
133
|
* Fixes `where` clause being built even when search term is an empty string.
|
43
134
|
Thanks to [e-fisher](https://github.com/e-fisher) for spotting and fixing this.
|
44
135
|
|
45
|
-
## 0.1.1
|
136
|
+
## 0.1.1 (2014-06-13)
|
46
137
|
* Fixes problem on `searchable_columns` where the corresponding model is
|
47
138
|
a composite model name, e.g. `UserData`, `BillingAddress`.
|
48
139
|
Thanks to [iruca3](https://github.com/iruca3) for the fix.
|
49
140
|
|
50
|
-
## 0.1.0
|
141
|
+
## 0.1.0 (2014-05-21)
|
51
142
|
* A fresh start. Sets base class name to: `AjaxDatatablesRails::Base`.
|
52
143
|
* Extracts pagination functions to mixable modules.
|
53
144
|
* A user would have the option to stick to the base
|
@@ -65,3 +156,7 @@ Thanks to [iruca3](https://github.com/iruca3) for the fix.
|
|
65
156
|
* Sets generator inside the `Rails` namespace. To generate an
|
66
157
|
`AjaxDatatablesRails` child class, just execute the
|
67
158
|
generator like this: `$ rails generate datatable NAME`.
|
159
|
+
|
160
|
+
## 0.0.1 (2012-09-10)
|
161
|
+
|
162
|
+
First release!
|
data/Gemfile
CHANGED
data/Guardfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
4
|
+
require 'guard/rspec/dsl'
|
5
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
6
|
+
|
7
|
+
# RSpec files
|
8
|
+
rspec = dsl.rspec
|
9
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
10
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
11
|
+
watch(rspec.spec_files)
|
12
|
+
|
13
|
+
# Ruby files
|
14
|
+
ruby = dsl.ruby
|
15
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
16
|
+
end
|
data/LICENSE
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
3
|
+
Copyright (c) 2012 Joel Quenneville
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|