formatting code

This commit is contained in:
cowboycoded 2011-03-06 22:03:51 -05:00
parent 9f73954ce7
commit e8292ef9c2
1 changed files with 15 additions and 15 deletions

View File

@ -25,33 +25,33 @@ Rails 3.0.4 and Ruby 1.9.2 (also tested on REE 1.8.7) - Sorry, but you need to u
Add it to your Gemfile
gem 'impressionist', :git => 'git@github.com:cowboycoded/impressionist.git'
gem 'impressionist', :git => 'git@github.com:cowboycoded/impressionist.git'
Install with Bundler
bundle install
bundle install
Generate the impressions table migration
rails g impressionist
rails g impressionist
Run the migration
rake db:migrate
rake db:migrate
The following fields are provided in the migration:
t.string "impressionable_type" # model type: Widget
t.integer "impressionable_id" # model instance ID: @widget.id
t.integer "user_id" # automatically logs @current_user.id
t.string "controller_name" # logs the controller name
t.string "action_name" # logs the action_name
t.string "view_name" # TODO: log individual views (as well as partials and nested partials)
t.string "request_hash" # unique ID per request, in case you want to log multiple impressions and associate them together
t.string "ip_address" # request.remote_ip
t.string "message" # custom message you can add
t.datetime "created_at" # I am not sure what this is.... Any clue?
t.datetime "updated_at" # never seen this one before either.... Your guess is as good as mine??
t.string "impressionable_type" # model type: Widget
t.integer "impressionable_id" # model instance ID: @widget.id
t.integer "user_id" # automatically logs @current_user.id
t.string "controller_name" # logs the controller name
t.string "action_name" # logs the action_name
t.string "view_name" # TODO: log individual views (as well as partials and nested partials)
t.string "request_hash" # unique ID per request, in case you want to log multiple impressions and associate them together
t.string "ip_address" # request.remote_ip
t.string "message" # custom message you can add
t.datetime "created_at" # I am not sure what this is.... Any clue?
t.datetime "updated_at" # never seen this one before either.... Your guess is as good as mine??
== Usage