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

exclude_field doesn't work for record attributes #10

Closed
solutus opened this issue Jul 30, 2012 · 7 comments
Closed

exclude_field doesn't work for record attributes #10

solutus opened this issue Jul 30, 2012 · 7 comments

Comments

@solutus
Copy link

solutus commented Jul 30, 2012

It works only for associations.

One more example:
a is boolean attribute

  • set a: false # a = true
  • set a: nil # a = true
  • set a: 0 works fine # a = false
@rocksolidwebdesign
Copy link
Contributor

Yes, it's only supposed to work for associations. If you want to do anything to a plain/non-association field, then you should use the field processors like nullify, for example http://rubydoc.info/gems/amoeba/1.2.1/file/README.md#Nullify

@solutus
Copy link
Author

solutus commented Jul 30, 2012

nullify isn't possible for boolean attributes with default value. Is it possible to change 'set' method, to set value to false. Currently, it doesn't work.

@rocksolidwebdesign
Copy link
Contributor

hmm, odd, I don't see why set false wouldn't work, it's not working for you? can you write up a test case in the spec to prove that it fails?

@solutus
Copy link
Author

solutus commented Jul 30, 2012

Yes, but a bit later.

@rocksolidwebdesign
Copy link
Contributor

cool thanks

@rocksolidwebdesign
Copy link
Contributor

any progress on this?

@rocksolidwebdesign
Copy link
Contributor

closing this for now, due to inactivity

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

2 participants