Monthly Archives: June 2015

Using wrap_parameters to allow a non-ActiveRecord parameter

Rails 4 introduced strong parameters: With strong parameters, Action Controller parameters are forbidden to be used in Active Model mass assignments until they have been whitelisted. This means that you’ll have to make a conscious decision about which attributes to allow for mass update. This is a better security practice to help prevent accidentally allowing […]

Posted in Technology | Leave a comment

Using a period in YAML tokens

While working on an internationalized Rails application, I came across a case where the names of countries were being translated through the YAML locale configuration files. While a valid short-term measure, I would prefer using a gem like Globalize and storing the translations in a Country model, for example. But in the meanwhile, I was […]

Posted in Technology | Leave a comment