1

I am using public_activity gem to track some changes in a model. I have no need for default receipt_id and receipent_type columns.

SO i just remove them from migration. But i am getting error while creating public_activity like this in controller

@batch.create_activity key: create, owner: current_user

ActiveRecord::StatementInvalid in MyController#update Mysql2::Error: Unknown column 'parameters' in 'field list': INSERT INTO `activities

Zia Qamar
  • 1,694
  • 1
  • 15
  • 35

1 Answers1

1

As far as I understand this gem creates a separate DB entry for each change (in the same way as the paper_trail gem). This means that you need the id and type columns so the gem can match it to the object they originate from. Should work fine if you don't remove those columns.

Severin
  • 8,508
  • 14
  • 68
  • 117
  • Yes, its working fine but i don't want to add those columns. So you mean to say that no column can be removed from this gem migration – Zia Qamar Mar 05 '18 at 11:22
  • 1
    Yes exactly, you can't remove those columns without loosing the functionality of the gem. – Severin Mar 05 '18 at 12:05