can't convert Symbol into String
It seems like you are trying to use strong paramaters. You get this error cannot convert symbol into string because you have not configured the strong_parameters. So by default you cant use require on params with symbols.
Configure strong parameters as follows:
1.) Add gem 'strong_parameters' to your gemfile and bundle it.2.) Include Restrictions to you model as follows. include ActiveModel::ForbiddenAttributesProtection to your model.3.) Disable white listing in application confiuration(config/application.rb) config.active_record.whitelist_attributes = false
See the documentation for more details on configuring.
Now your code should work.
If anyone is using Mongoid, you can fix this issue by adding the following to an initializer:
Mongoid::Document.send(:include, ActiveModel::ForbiddenAttributesProtection)
Add gem 'strong_parameters' to the gem file and run >bundle install in command promptRefresh the browser.