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

Can't create global read marks if a model is both reader and readable #28

Open
caffeineshock opened this issue Nov 26, 2013 · 0 comments

Comments

@caffeineshock
Copy link

If have a model like the following

class User < ActiveRecord::Base
  acts_as_reader
  acts_as_readable :on => :created_at
end

marking all instances of a model won't work. It seems that calling has_many with the same association. if I change the call of has_many in acts_as_readable to

has_many :read_marks_readable, :class_name => "ReadMark", :as => :readable, :dependent => :delete_all

all is well (if readable.rb is updated too, of course). Should I issue a pull request for that change? And if so do you have a good idea what to call the associations?

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

1 participant