lib/unread/reader_scopes.rb in unread-0.8.1 vs lib/unread/reader_scopes.rb in unread-0.8.2

- old
+ new

@@ -25,12 +25,14 @@ def have_read(readable) join_read_marks(readable).where("#{ReadMark.quoted_table_name}.id IS NOT NULL") end def with_read_marks_for(readable) + postgresql_string_cast = using_postgresql? ? '::varchar' : '' + join_read_marks(readable).select("#{quoted_table_name}.*, #{ReadMark.quoted_table_name}.id AS read_mark_id, - '#{readable.class.name}' AS read_mark_readable_type, + #{quote_bound_value readable.class.name}#{postgresql_string_cast} AS read_mark_readable_type, #{readable.id} AS read_mark_readable_id") end end end end