diff --git a/core/lib/refinery/crud.rb b/core/lib/refinery/crud.rb index 9b6590ec89..3ffd5edaf8 100644 --- a/core/lib/refinery/crud.rb +++ b/core/lib/refinery/crud.rb @@ -69,7 +69,10 @@ def new def create if (@#{singular_name} = #{class_name}.create(params[:#{singular_name}])).valid? - flash.notice = t('refinery.crudify.created', :what => "'\#{@#{singular_name}.#{options[:title_attribute]}}'") + flash.notice = t( + 'refinery.crudify.created', + :what => "'\#{@#{singular_name}.#{options[:title_attribute]}}'" + ) create_or_update_successful else @@ -83,7 +86,10 @@ def edit def update if @#{singular_name}.update_attributes(params[:#{singular_name}]) - flash.notice = t('refinery.crudify.updated', :what => "'\#{@#{singular_name}.#{options[:title_attribute]}}'") + flash.notice = t( + 'refinery.crudify.updated', + :what => "'\#{@#{singular_name}.#{options[:title_attribute]}}'" + ) create_or_update_successful else @@ -116,7 +122,9 @@ def find_#{singular_name}_scope # It will be ordered based on the conditions specified into crudify # And eager loading is applied as specified into crudify. def find_all_#{plural_name}(conditions = #{options[:conditions].inspect}) - @#{plural_name} = find_#{singular_name}_scope.where(conditions).order("#{options[:order]}") + @#{plural_name} = find_#{singular_name}_scope + .where(conditions) + .order("#{options[:order]}") end def merge_position_into_params!