Adding params field to migration file.
This commit is contained in:
parent
9d997bc600
commit
8c3407fd33
|
@ -1,4 +1,2 @@
|
|||
class Impression
|
||||
attr_accessible :params
|
||||
store :params
|
||||
end
|
||||
|
|
|
@ -12,6 +12,7 @@ class CreateImpressionsTable < ActiveRecord::Migration
|
|||
t.string :session_hash
|
||||
t.text :message
|
||||
t.text :referrer
|
||||
t.text :params
|
||||
t.timestamps
|
||||
end
|
||||
add_index :impressions, [:impressionable_type, :message, :impressionable_id], :name => "impressionable_type_message_index", :unique => false, :length => {:message => 255 }
|
||||
|
@ -21,6 +22,7 @@ class CreateImpressionsTable < ActiveRecord::Migration
|
|||
add_index :impressions, [:controller_name,:action_name,:request_hash], :name => "controlleraction_request_index", :unique => false
|
||||
add_index :impressions, [:controller_name,:action_name,:ip_address], :name => "controlleraction_ip_index", :unique => false
|
||||
add_index :impressions, [:controller_name,:action_name,:session_hash], :name => "controlleraction_session_index", :unique => false
|
||||
add_index :impressions, [:impressionable_type, :impressionable_id, :params], :name => "poly_params_request_index", :unique => false
|
||||
add_index :impressions, :user_id
|
||||
end
|
||||
|
||||
|
|
|
@ -9,6 +9,6 @@ class Impression < ActiveRecord::Base
|
|||
# sets belongs_to and attr_accessible depending on Rails version
|
||||
Impressionist::SetupAssociation.new(self).set
|
||||
|
||||
store :params
|
||||
after_save :impressionable_counter_cache_updatable?
|
||||
|
||||
end
|
||||
|
|
|
@ -35,7 +35,8 @@ module Impressionist
|
|||
:view_name,
|
||||
:referrer,
|
||||
:message,
|
||||
:user_id)
|
||||
:user_id,
|
||||
:params)
|
||||
end
|
||||
|
||||
def toggle
|
||||
|
|
Loading…
Reference in New Issue