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

Parent class doesn't respect before_save filter of Child class #31

Open
sebitoelcheater opened this issue Feb 11, 2015 · 1 comment
Open

Comments

@sebitoelcheater
Copy link

Suppose we have a Parent class and his Child class, let's say Attachment and Image respectively. If i put a before_save in Image, let's say

class Image
   act_as :attachment
   before_save :check_something
end

the check_something method won't be respected by Attachment, and any param that were in Attachment model and that were changed before executing image.save, will be saved anyway, whether it doesn't pass the check_something filter.

@hzamani
Copy link
Owner

hzamani commented May 9, 2015

Can you explain this with a detailed example with attributes.

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