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

Model::Field compact_attributes should not return nils; unset_attributes should be a thing #9

Open
kornypoet opened this issue Mar 26, 2013 · 0 comments

Comments

@kornypoet
Copy link
Contributor

  1. compact_attributes does return "nil but set" attributes. This differs from attributes.compact, which is surprising behavior.
  2. unset_attributes should exist, with the current functionality of compact_attributes, and...
  3. unset_attributes should trigger the firing of the defaults, because...
    • otherwise calling or not calling attributes and then compact_attributes give different behavior; this should be addressed by...
  4. attribute_set? should return true for a field with a default.
    • this is somewhat controversial, but if you believe as flip does that an attribute with a default has always had that value, just lazily evaluated then the behavior is correct.

Bug atually filed by flip, so if TD disagrees he may follow up...

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