simple_form_object 0.0.7 → 0.0.8

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: 73485885f010300cc9a362e85612e3f279f52926
4
- data.tar.gz: 908ce72ef544b469e02cbd9328065f0a18a28b4d
3
+ metadata.gz: 5a296fd822ede70ffc73dd3a74f80fc7a6e733de
4
+ data.tar.gz: 2137e4348acee463f2262314afeae2d4c2b180a8
5
5
  SHA512:
6
- metadata.gz: f761ced4db494a667e2734d2fe591c0e5756ad545ad9d2eab0adc6ecd73c8cf4aff623600484e90e42be89099f207c8c2b593f41af74872752d70a9bf2f68b40
7
- data.tar.gz: 5d819b5438d3d7caccddbf3231b3cc9e4ec2715712a532077547c2619340de44ba553226ef9a0c50a01ecf3afe721f65351172034601064d976fba935a32b1b5
6
+ metadata.gz: 307c4eeba567865fa817b82ff6cf3aa2e0d9f96b230480bc83532ca4fb23365e96cac294c3f63ea39133a6dfd528b69dcf30cb527569486daa4bd9957359b25a
7
+ data.tar.gz: d3497b99bdc805b3c341b3e99a2dd69041fd7f4b5141b1633bc1f67a5354ec492925e15df24c9148be5fff63db66d7cbdbaf9e18de7bef44371f4fe79f8de7e8
@@ -70,6 +70,10 @@ module SimpleFormObject
70
70
  self.class._attribute(attribute).fake_column
71
71
  end
72
72
 
73
+ def has_attribute?(attribute_name)
74
+ self.class._attribute(attribute_name).present?
75
+ end
76
+
73
77
  def initialize(attributes={})
74
78
  super
75
79
  self.class._attributes.each do |attribute|
@@ -1,3 +1,3 @@
1
1
  module SimpleFormObject
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -39,6 +39,10 @@ describe 'SimpleFormObject' do
39
39
  it 'should return a fake column with the correct type' do
40
40
  expect(instance.column_for_attribute(attr).type).to eq type
41
41
  end
42
+
43
+ it 'should say that the attribute exists' do
44
+ expect(instance.has_attribute?(attr)).to eq true
45
+ end
42
46
  end
43
47
 
44
48
  describe 'options' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonard Garvey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel