We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think there is a bug with theses predicated methods. Kind of confusion.
In my model:
enum_attr :gender, %w(^none male female) do label :none => '' label :male => '男性' label :female => '女性' end
I set my model gender to :male. Look at the result in the console:
1.9.3-p0 :018 > s.gender => :male 1.9.3-p0 :019 > s.gender_male? => true 1.9.3-p0 :020 > s.gender_female? => true 1.9.3-p0 :021 > s.gender_none? => false
Why does it return "true" for female ? Is it because in "female" there is the word "male" so it is confused ?
I'm using: Using enumerated_attribute (0.3.0.beta1) from https://github.com/jeffp/enumerated_attribute.git (at master)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think there is a bug with theses predicated methods. Kind of confusion.
In my model:
I set my model gender to :male.
Look at the result in the console:
Why does it return "true" for female ?
Is it because in "female" there is the word "male" so it is confused ?
I'm using:
Using enumerated_attribute (0.3.0.beta1) from https://github.com/jeffp/enumerated_attribute.git (at master)
The text was updated successfully, but these errors were encountered: