Skip to content
Rails: Record user activities without controller helpers, build on top of userstamps plugin
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
README.markdown
init.rb

README.markdown

Problem

  • Activity loggin should not invole the controller

Solution

  • Build activity loggin on top of userstamps plugin

Install

script/plugin install git://github.com/grosser/record_activities.git

Setup

Install and setup userstamp Create an activities table in your database with user_id and string action.

Usage

class Comment < ActiveRecord::Base
  stampable
  record_activities #same as record_activities  :create, :update
end

Activity.find(:all,:conditions=>{:user_id=>12,:action=>'create')
or user has_many :activities in your user.rb
Something went wrong with that request. Please try again.