effective_datatables 2.1.18 → 2.1.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98b4b0af913fcceadc87a19039f0e5b7356d3692
4
- data.tar.gz: 27e53261b4369bc8b4d8090e59330e743db551cc
3
+ metadata.gz: 5339024b859bc029be46dd806b51043cdfafba48
4
+ data.tar.gz: b5ae365e4e1266aaa6c8867872abad0292676a48
5
5
  SHA512:
6
- metadata.gz: e72cfb58bd5196815f24e91fa608879e9a3df4ec11e7c12af67ec02a5a03d2fb163e9df3c672dff6eef991f90a21e650928cc1db2e304c52b3cc7f8d44e1cda1
7
- data.tar.gz: efde860bfef45b0c9e8c358a2168f44052af19a5eff8b80a7fef80bf9a3895844554ff0278e3e3a14c476c5c0380e790ae2abdd29a39e45a3aea974f43df89b1
6
+ metadata.gz: 64d6f12f0d423311b8fa6eea013273a04101dda84731dfcb928fdb8e3d9d569bb5296554765046fe44eb0725009a1102433f16ac3b74cae501d9c691abb7eb97
7
+ data.tar.gz: 030e2ffc6b9a210ad93333e1f231f1985a5939501719dd0d5f1cca2a5fe53b82756383816a07e51b80b3070405eaad2a94c21984f1649ef06a0fa2a4f4a39169
@@ -25,7 +25,10 @@ module Effective
25
25
  private
26
26
 
27
27
  def find_datatable(id)
28
- "effective/datatables/#{id}".classify.tap { |klass| klass << 's' if id.to_s.end_with?('s') }.safe_constantize
28
+ id_plural = id.pluralize == id && id.singularize != id
29
+ klass = "effective/datatables/#{id}".classify
30
+
31
+ (id_plural ? klass.pluralize : klass).safe_constantize
29
32
  end
30
33
 
31
34
  def error_json
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '2.1.18'.freeze
2
+ VERSION = '2.1.19'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.18
4
+ version: 2.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-23 00:00:00.000000000 Z
11
+ date: 2015-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails