Skip to content

Commit

Permalink
Remove redundant #to_sym
Browse files Browse the repository at this point in the history
  • Loading branch information
pkondzior committed Jan 17, 2012
1 parent 5313eab commit 6174d3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activemodel/lib/active_model/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def [](attribute)
# p.errors[:name] = "must be set"
# p.errors[:name] # => ['must be set']
def []=(attribute, error)
self[attribute.to_sym] << error
self[attribute] << error
end

# Iterates through each error key, value pair in the error messages hash.
Expand Down

0 comments on commit 6174d3b

Please sign in to comment.