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

Flexible behaviour for STI models as Readable #68

Merged
merged 1 commit into from
Mar 2, 2016
Merged

Flexible behaviour for STI models as Readable #68

merged 1 commit into from
Mar 2, 2016

Conversation

tangopium
Copy link
Contributor

Allows STI subclasses to be defined as readable without affecting parent classes.

For example:

class Message < ActiveRecord::Base
    ...
end
class SystemMessage < Message
    acts_as_readable :on => :updated_at
end
class UserMessage < Message
    acts_as_readable :on => :updated_at
end

The modification allows to mark UserMessages all as read without doing the same (unintentional) for all Messages (including the SystemMessages)

ledermann added a commit that referenced this pull request Mar 2, 2016
Flexible behaviour for STI models as Readable
Closes #66
@ledermann ledermann merged commit 1380f53 into ledermann:master Mar 2, 2016
@ledermann
Copy link
Owner

@tangopium: Great, thank you very much!

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

Successfully merging this pull request may close these issues.

None yet

2 participants