Skip to content

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