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