ruby on rails - Change public_activity collection name with Mongoid -
ruby on rails - Change public_activity collection name with Mongoid -
so https://github.com/pokonski/public_activity/wiki/%5bhow-to%5d-change-table-name-for-activities not specify how alter collection name in mongoid. have activity collection.
also method mentioned here not work https://github.com/pokonski/public_activity/issues/87. throws error;
undefined method collection_name= #<publicactivity::config:0x007fd57423f7e8> (nomethoderror)
i see have included store_in collection: publicactivity.config.table_name
in /public_activity/orm/mongoid/activity.rb
.
but after setting table_name in initializer;
publicactivity.config.table_name = "public_events"
i'm getting error when creating object of tracked model;
problem: attempted set value 'key' not allowed on model activity. summary: without including mongoid::attributes::dynamic in model , attribute not exist in attributes hash, attempting phone call activity#key= not allowed. triggered passing attribute method accepts attributes hash, , raised instead of getting nomethoderror. resolution: can include mongoid::attributes::dynamic if expect writing values undefined fields often.
it still trying write activity model have in application.
ruby-on-rails public-activity
Comments
Post a Comment