-
Notifications
You must be signed in to change notification settings - Fork 43
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
Some read-only DPs return false for "read_only?" #1399
Comments
Well, I would go for variant 2 because it is probably enough to override |
Actually not only boolean, any attribute has |
@prioux Should I work on it, or would you prefer to take care of it yourselves? |
Fixed all the DPs with an explicit def read_only?
true
end |
Some DPs are meant to be read-only. Usually, they inform the rest of the system by just overriding the method read_only() in this way:
The attribute read_only is a database column. However, for boolean columns, Rails also provide
read_only?
. Since that method is not overridden, it returns false if the DB's value has not been set. So we get this kind of behavior:There are several solutions. Not sure what is best.
read_only?
tooThe text was updated successfully, but these errors were encountered: