formatting code
This commit is contained in:
parent
9f73954ce7
commit
e8292ef9c2
30
README.rdoc
30
README.rdoc
|
@ -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
|
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
|
Install with Bundler
|
||||||
|
|
||||||
bundle install
|
bundle install
|
||||||
|
|
||||||
Generate the impressions table migration
|
Generate the impressions table migration
|
||||||
|
|
||||||
rails g impressionist
|
rails g impressionist
|
||||||
|
|
||||||
Run the migration
|
Run the migration
|
||||||
|
|
||||||
rake db:migrate
|
rake db:migrate
|
||||||
|
|
||||||
The following fields are provided in the migration:
|
The following fields are provided in the migration:
|
||||||
|
|
||||||
t.string "impressionable_type" # model type: Widget
|
t.string "impressionable_type" # model type: Widget
|
||||||
t.integer "impressionable_id" # model instance ID: @widget.id
|
t.integer "impressionable_id" # model instance ID: @widget.id
|
||||||
t.integer "user_id" # automatically logs @current_user.id
|
t.integer "user_id" # automatically logs @current_user.id
|
||||||
t.string "controller_name" # logs the controller name
|
t.string "controller_name" # logs the controller name
|
||||||
t.string "action_name" # logs the action_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 "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 "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 "ip_address" # request.remote_ip
|
||||||
t.string "message" # custom message you can add
|
t.string "message" # custom message you can add
|
||||||
t.datetime "created_at" # I am not sure what this is.... Any clue?
|
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.datetime "updated_at" # never seen this one before either.... Your guess is as good as mine??
|
||||||
|
|
||||||
== Usage
|
== Usage
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue