Skip to content

[How to] Change table name for activities

Piotrek Okoński edited this page Oct 22, 2013 · 1 revision

The default ActiveRecord table name for Activity model is activities.

If for some reason you want to change it (for example: you already have an activities table in your existing application). You can do that through the config block:

Create config/initializers/public_activity.rb file and save the following code in it:

PublicActivity::Config.set do
  table_name "my_activities"
end

where my_activities is your own name.