grid_table 1.0.1 → 1.0.2

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: c73b15fc758b9d8b0af82eb6899c86a436afbcec
4
- data.tar.gz: bce6159cdf5f65239d7cbfb6075523df20f5c660
3
+ metadata.gz: 9116ceffbe5afdf4c31eeff57e8cc3dede57352e
4
+ data.tar.gz: 151375fa96e699538ef43cbcc71886a11efd2230
5
5
  SHA512:
6
- metadata.gz: bd6abc961e4e681faad769dd8184f4ebdf8d8d96672a0436bb0fff989ff0ca00ec0e02630d6b20d5d3b99e1d1ef10798bee424bd34f042900777412493e6a068
7
- data.tar.gz: 121a81dfc4d7dd5202c2ed5c59edc7eb37a919ddd95e3862e00ed446327175be723668649cd98676b70d102a71fe709472c379a8b7f38abe7e7df06eec2c19e4
6
+ metadata.gz: 779533c00fb9044ad199f91bd862e50ef4b4a14f70b8acdeb24a83656fcb27868fa8420cbd67cbe1bb7b17a7dac2b0055fa56556b65592edfdc627c1b5c28fb9
7
+ data.tar.gz: d87fd57b54ef019216d13b4e9e78ae3334dc8537864c4b088b2ad3ae2de6fdc51004ab7307435acf46b43efa679598b6b2e0f661323c56a0a9d5608eda0d034c
@@ -1,5 +1,42 @@
1
1
  class GridTable::Control
2
- include ActiveModel::Model
2
+ include ActiveModel::Validations
3
+ include ActiveModel::Conversion
4
+
5
+ included do
6
+ extend ActiveModel::Naming
7
+ extend ActiveModel::Translation
8
+ end
9
+
10
+ # Initializes a new model with the given +params+.
11
+ #
12
+ # class Person
13
+ # include ActiveModel::Model
14
+ # attr_accessor :name, :age
15
+ # end
16
+ #
17
+ # person = Person.new(name: 'bob', age: '18')
18
+ # person.name # => "bob"
19
+ # person.age # => "18"
20
+ def initialize(params={})
21
+ params.each do |attr, value|
22
+ self.public_send("#{attr}=", value)
23
+ end if params
24
+
25
+ super()
26
+ end
27
+
28
+ # Indicates if the model is persisted. Default is +false+.
29
+ #
30
+ # class Person
31
+ # include ActiveModel::Model
32
+ # attr_accessor :id, :name
33
+ # end
34
+ #
35
+ # person = Person.new(id: 1, name: 'bob')
36
+ # person.persisted? # => false
37
+ def persisted?
38
+ false
39
+ end
3
40
 
4
41
  attr_writer :model, :attribute, :source, :source_class, :source_column, :filter, :polymorphic
5
42
 
@@ -1,3 +1,3 @@
1
1
  module GridTable
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grid_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Principe