fix for bug undefined method 'belongs_to' for Impression:Class
This commit is contained in:
parent
7a93fff255
commit
00e658b28d
|
@ -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