Skip to content

Conversation

boie0025
Copy link

I was attempting to set an attribute on a Her model object using the hash syntax and came across a strange error

> subject[:some_attribute] = "bar" 
# => ArgumentError: wrong number of arguments (2 for 1) ... /lib/her/model/attributes.rb:193

Investigation revealed that Her was interpreting [] as a hash key, therefore the expected hash key was used as the value for the key []. This PR is a quick change that stops Her from using [] as a hash key with a setter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant