Skip to content

Commit

Permalink
Fix base_class usage for ActiveRecord < 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Nov 8, 2015
1 parent 4ac0b9e commit b236302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/unread/readable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def reset_read_marks_for_user(reader)
assert_reader(reader)

ReadMark.transaction do
reader.read_marks.where(:readable_type => self.base_class).delete_all
reader.read_marks.create! :readable_type => self.base_class, :timestamp => Time.current
reader.read_marks.where(:readable_type => self.base_class.name).delete_all
reader.read_marks.create! :readable_type => self.base_class.name, :timestamp => Time.current
end

reader.forget_memoized_read_mark_global
Expand Down

0 comments on commit b236302

Please sign in to comment.