Module: Adventtec::Acts::Likable::SingletonMethods
- Defined in:
- lib/movr_acts_as_likeable.rb
Overview
This module contains class methods
Instance Method Summary collapse
Instance Method Details
#find_likes_cast_by_user(user) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/movr_acts_as_likeable.rb', line 20 def find_likes_cast_by_user(user) likable = ActiveRecord::Base.send(:class_name_of_active_record_descendant, self).to_s Like.find(:all, :conditions => ["user_id = ? likable_type = ?", user.id, likable], :order => "created_at DESC" ) end |