-
Notifications
You must be signed in to change notification settings - Fork 336
Upgrading from pre 0.4.0 versions
Piotrek Okoński edited this page Jul 7, 2013
·
1 revision
Read this if you have been using versions older than 0.4.
There are a couple of major differences between 0.3 and 0.4 version. To upgrade, follow these steps:
-
Add
include PublicActivity::Model
abovetracked
method call in your tracked models, like this:ActiveRecord:
class Article < ActiveRecord::Base include PublicActivity::Model tracked end
Mongoid:
class Article include Mongoid::Document include PublicActivity::Model tracked end
-
public_activity's config YAML file is no longer used (by default in
config/pba.yml
). Move your YAML contents to yourconfig/locales/*.yml
files.
IMPORTANT: Locales are no longer rendered with ERB, this has been removed in favor of real view partials like in actual Rails apps. Read Activity views section above to learn how to use those templates. -
(ActiveRecord only) Generate and run migration which adds new column to
activities
table:rails g public_activity:migration_upgrade rake db:migrate