# File app/controllers/sys_conf_adm_controller.rb, line 222 def add_catalog_row redirect_to(:action => 'show_catalog', :catalog => @cat_name) return true unless request.post? param_cat = @cat_name.singularize return true unless params.has_key?(param_cat) begin @catalog.new(:name => params[param_cat][:name]).save! flash[:notice] << _('The new %s was successfully registered') % param_cat rescue ActiveRecord::RecordInvalid => err flash[:error] << _('Could not create new %s: %s') % [param_cat, err.to_s] end end