Merge pull request #53 from elfassy/master

Fix model inconsistency
This commit is contained in:
John McAliley 2013-02-19 12:22:27 -08:00
commit 9f9ed8fb87
3 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,2 @@
class Impression
belongs_to :impressionable, :polymorphic=>true
end

View File

@ -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

View File

@ -13,4 +13,6 @@ class Impression
key :message, String
key :referrer, String
timestamps!
belongs_to :impressionable, :polymorphic=>true
end