-1

I already have an table with name activities so I created public_activity.rb file with this line as some one suggested in an issue

PublicActivity::ORM::ActiveRecord::Activity.table_name = "notifications"

but when I try to run

rails g public_activity:migration notifications

it fails because of a name error uninitialized constant PublicActivity::ORM (NameError). Any one can resolve this error.

Asnad Atta
  • 3,855
  • 1
  • 32
  • 49

1 Answers1

0

There's an easier way to set a custom table name. Just put this in your initializer:

# config/initializers/public_activity.rb
PublicActivity.configure do |config|
  config.table_name = 'notifications'
end
fivedigit
  • 18,464
  • 6
  • 54
  • 58