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

returning(foo) is deprecated in favor of foo.tap #6

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

mat813
Copy link

@mat813 mat813 commented Mar 29, 2011

No description provided.

@mat813
Copy link
Author

mat813 commented Apr 14, 2011

In Rails, the parameters we get from the web are all strings, but bitmask-attribute uses symbols. passing it strings is not a problem, as it gets it right, but it keeps the string in it's cache and it's a mess :

>> c.code
[
    [0] :power
]
>> c.code?(:power)
true
>> c.code?('power')
false
>> c.update_attributes("code" => ["power"])
true
>> c.code?(:power)
false
>> c.code?('power')
true
>> c.code
[
    [0] "power"
]

With this commit, it does :

>> c.code
[
    [0] :power
]
>> c.update_attributes("code" => ["power"])
true
>> c.code?(:power)
true
>> c.code 
[
    [0] :power
]

teeparham referenced this pull request in teeparham/bitmask_attributes Mar 20, 2012
wrap two scopes in procs to fix migration/startup issues
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.

2 participants