static-model 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,8 +109,8 @@ class StaticModel
109
109
  # @param error [String] The error message.
110
110
  # @param attribute [Symbol] The attribute of the model to place the error message on.
111
111
  # @return [boolean] Returns `false` in order to halt any validation chain it may be invoked from.
112
- def add_error_and_return_false(error, attribute = :base)
113
- errors[attribute] << error
112
+ def add_error_and_return_false(error, attribute = :base, options = {})
113
+ errors.add(attribute, error, options)
114
114
  false
115
115
  end
116
116
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'static-model'
5
- s.version = '1.1.1'
5
+ s.version = '1.1.2'
6
6
  s.summary = 'A base non–database-backed model for Rails.'
7
7
  s.homepage = 'http://codyrobbins.com/software/static-model'
8
8
  s.author = 'Cody Robbins'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: static-model
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Cody Robbins
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-05 00:00:00 -04:00
18
+ date: 2011-07-06 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency