data_tables 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/data_tables.rb +5 -1
  2. metadata +1 -1
data/lib/data_tables.rb CHANGED
@@ -9,7 +9,11 @@ module DataTablesController
9
9
  modelCls = Kernel.const_get(model.to_s.split("_").collect(&:capitalize).join)
10
10
  modelAttrs = nil
11
11
  if modelCls < Ohm::Model
12
- modelAttrs = Hash[*modelCls.new.attributes.collect { |v| [v.to_s, nil] }.flatten]
12
+ if Gem.loaded_specs['ohm'].version == Gem::Version.create('0.1.5')
13
+ modelAttrs = Hash[*modelCls.new.attributes.collect { |v| [v.to_s, nil] }.flatten]
14
+ else
15
+ modelAttrs = {}
16
+ end
13
17
  else
14
18
  modelAttrs = modelCls.new.attributes
15
19
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: data_tables
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.6
5
+ version: 0.1.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Duane Compton