Skip to content

Commit

Permalink
STI compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien Gruhier committed Jul 19, 2012
1 parent d0b315f commit 02e8aae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/socialization/stores/active_record/follow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def followers_relation(followable, klass, opts = {})
rel = klass.where(:id =>
self.select(:follower_id).
where(:follower_type => klass.table_name.classify).
where(:followable_type => followable.class.to_s).
where(:followable_type => followable.class.base_class.to_s).
where(:followable_id => followable.id)
)

Expand Down
2 changes: 1 addition & 1 deletion lib/socialization/stores/active_record/like.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def likeables_relation(liker, klass, opts = {})
rel = klass.where(:id =>
self.select(:likeable_id).
where(:likeable_type => klass.table_name.classify).
where(:liker_type => liker.class.to_s).
where(:liker_type => liker.class.base_class.to_s).
where(:liker_id => liker.id)
)

Expand Down
2 changes: 1 addition & 1 deletion lib/socialization/stores/active_record/mention.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def mentioners_relation(mentionable, klass, opts = {})
rel = klass.where(:id =>
self.select(:mentioner_id).
where(:mentioner_type => klass.table_name.classify).
where(:mentionable_type => mentionable.class.to_s).
where(:mentionable_type => mentionable.class.base_class.to_s).
where(:mentionable_id => mentionable.id)
)

Expand Down

0 comments on commit 02e8aae

Please sign in to comment.