commit
9f9ed8fb87
|
@ -1,3 +1,2 @@
|
|||
class Impression
|
||||
belongs_to :impressionable, :polymorphic=>true
|
||||
end
|
||||
|
|
|
@ -3,6 +3,8 @@ class Impression < ActiveRecord::Base
|
|||
:controller_name, :action_name, :view_name, :request_hash, :ip_address,
|
||||
:session_hash, :message, :referrer
|
||||
|
||||
belongs_to :impressionable, :polymorphic=>true
|
||||
|
||||
after_save :update_impressions_counter_cache
|
||||
|
||||
private
|
||||
|
|
|
@ -13,4 +13,6 @@ class Impression
|
|||
key :message, String
|
||||
key :referrer, String
|
||||
timestamps!
|
||||
|
||||
belongs_to :impressionable, :polymorphic=>true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue