diff options
author | Carl Lerche <me@carllerche.com> | 2011-02-05 15:37:38 -0800 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2011-02-05 15:37:38 -0800 |
commit | 7176ade35b4d6b167873991e0851f3fb9d46ae3b (patch) | |
tree | a4141221525f67cab26f2b0d9e2e7f1bf25c094c /activemodel/lib | |
parent | b9309b47cda12db34ac3427fbafff2dca0314ed7 (diff) | |
download | rails-7176ade35b4d6b167873991e0851f3fb9d46ae3b.tar.gz rails-7176ade35b4d6b167873991e0851f3fb9d46ae3b.tar.bz2 rails-7176ade35b4d6b167873991e0851f3fb9d46ae3b.zip |
Do not require that validation attributes be specified as symbols
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/validations/validates.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index 0132f68282..172ca70c19 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -84,7 +84,6 @@ module ActiveModel validations = defaults.slice!(:if, :unless, :on, :allow_blank, :allow_nil) raise ArgumentError, "You need to supply at least one attribute" if attributes.empty? - raise ArgumentError, "Attribute names must be symbols" if attributes.any?{ |attribute| !attribute.is_a?(Symbol) } raise ArgumentError, "You need to supply at least one validation" if validations.empty? defaults.merge!(:attributes => attributes) @@ -118,4 +117,4 @@ module ActiveModel end end end -end
\ No newline at end of file +end |