Merge pull request #29 from tute/master
White listing all Impression attributes for supporting new active_record.whitelist_attributes default
This commit is contained in:
commit
9321135b0b
|
@ -3,6 +3,10 @@ class Impression < ActiveRecord::Base
|
||||||
|
|
||||||
after_save :update_impressions_counter_cache
|
after_save :update_impressions_counter_cache
|
||||||
|
|
||||||
|
attr_accessible :impressionable_type, :impressionable_id, :user_id,
|
||||||
|
:controller_name, :action_name, :view_name, :request_hash, :ip_address,
|
||||||
|
:session_hash, :message, :referrer
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def update_impressions_counter_cache
|
def update_impressions_counter_cache
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
Rails.application.routes.draw do
|
|
||||||
end
|
|
|
@ -24,14 +24,6 @@ class CreateImpressionsTable < ActiveRecord::Migration
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.down
|
def self.down
|
||||||
remove_index :impressions, :name => :poly_request_index
|
|
||||||
remove_index :impressions, :name => :poly_ip_index
|
|
||||||
remove_index :impressions, :name => :poly_session_index
|
|
||||||
remove_index :impressions, :name => :controlleraction_request_index
|
|
||||||
remove_index :impressions, :name => :controlleraction_ip_index
|
|
||||||
remove_index :impressions, :name => :controlleraction_session_index
|
|
||||||
remove_index :impressions, :user_id
|
|
||||||
|
|
||||||
drop_table :impressions
|
drop_table :impressions
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
Use this README file to introduce your application and point to useful places in the API for learning more.
|
|
||||||
Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
|
|
|
@ -1,12 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
require 'rails/performance_test_help'
|
|
||||||
|
|
||||||
class BrowsingTest < ActionDispatch::PerformanceTest
|
|
||||||
# Refer to the documentation for all available options
|
|
||||||
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
|
|
||||||
# :output => 'tmp/performance', :formats => [:flat] }
|
|
||||||
|
|
||||||
def test_homepage
|
|
||||||
get '/'
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,15 +0,0 @@
|
||||||
ENV["RAILS_ENV"] = "test"
|
|
||||||
require 'simplecov'
|
|
||||||
SimpleCov.start 'rails'
|
|
||||||
require File.expand_path('../../config/environment', __FILE__)
|
|
||||||
require 'rails/test_help'
|
|
||||||
|
|
||||||
class ActiveSupport::TestCase
|
|
||||||
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
|
||||||
#
|
|
||||||
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
|
||||||
# -- they do not yet inherit this setting
|
|
||||||
fixtures :all
|
|
||||||
|
|
||||||
# Add more helper methods to be used by all tests here...
|
|
||||||
end
|
|
Loading…
Reference in New Issue