It looks like you are trying to use strong options . You get this error; you cannot convert a character to a string because you did not configure strong_parameters. Therefore, by default, you cannot use params parameters with characters.
Set 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 customization.
Your code should now work.
Amarnath krishnan
source share