acts_as_activity_logged

No Gravatar

This was a very helpful rails plugin for my current project. It allows you to log whenever a object is added, modified or removed and who the action was performed by. I did make a couple changes to the plugin to be more in line with Rails 2. First I modified the activity table migration template, resulting in the up migration looking like this:

  def self.up

    create_table :activity_logs, :options => "DEFAULT CHARSET = utf8" do |t|

      t.belongs_to :user

      t.string :action

      t.references  :activity,  :null => false, :polymorphic => true

      t.references  :culprit,  :null => false, :polymorphic => true

      t.references  :referenced,  :null => false, :polymorphic => true

      t.timestamps

    end

  end

Also changed the directory name:
from: generators/activity_logger_migration/
to: generators/activity_logged_migration/

*Update* The changes are now included in the plugin, so these modifications are no longer needed.

To get the plugin goto: acts_as_activity_logged plugin by Jamie van Dyke

Tags: , ,

Related posts

Trackbacks

close Reblog this comment
blog comments powered by Disqus