Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attributes hash assumes symbols, fails with strings, pretty dumb #29

Open
mustmodify opened this issue Oct 17, 2017 · 1 comment
Open

Comments

@mustmodify
Copy link
Owner

class Fu < Valuable
  has_value :bar
end

>> f = Fu.new(bar: 6)

>> f.attributes['bar']
=> nil

>> f.attributes[:bar]
=> 6
@mustmodify
Copy link
Owner Author

Well, in order to get this to work, we'd need something like HashWithIndifferentAccess. Alternately, we could make this work for JUST attributes but not, for example, f.attributes['fu']['bar']. So ... 🤷‍♂

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

No branches or pull requests

1 participant