Fix crash updating legislation process categories

We were expecting translation parameters in legislation processes
`update` action. However, those parameters aren't sent when we get to
that action through the "proposals" tab.
This commit is contained in:
Javi Martín
2018-09-06 13:12:50 +02:00
parent 58ad333791
commit 4d238c5d07
2 changed files with 13 additions and 0 deletions

View File

@@ -8,6 +8,8 @@ module Translatable
private
def translation_params(resource_model)
return [] unless params[:enabled_translations]
resource_model.translated_attribute_names.product(enabled_translations).map do |attr_name, loc|
resource_model.localized_attr_name_for(attr_name, loc)
end