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
Assuming the example configuration:
class User < ActiveRecord::Base has_bitmask_attributes :notifications do |config| config.attribute :send_weekly_newsletter, 0b0001 config.attribute :send_monthly_newsletter, 0b0010, true end end
A new user will not match User.with_notifications(:send_monthly_newsletter), until something on the mask is set and saved.
User.with_notifications(:send_monthly_newsletter)
Probably defaults should be set after_initialize so that the defaults are actually saved to the database.
after_initialize
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Assuming the example configuration:
A new user will not match
User.with_notifications(:send_monthly_newsletter)
, until something on the mask is set and saved.Probably defaults should be set
after_initialize
so that the defaults are actually saved to the database.The text was updated successfully, but these errors were encountered: