module JamRuby
  class Like < ActiveRecord::Base

    belongs_to :user, :class_name => "JamRuby::User", :foreign_key => "user_id"
    belongs_to :likable, :polymorphic => true

    def type
      type = self.likable_type.gsub("JamRuby::", "").downcase
      type
    end

  end
end