app/controllers/admin/roles_controller.rb in the_role-2.0.3 vs app/controllers/admin/roles_controller.rb in the_role-2.0.4
- old
+ new
@@ -28,11 +28,11 @@
render :action => :new
end
end
def update
- if @role.update_role params[:role].try(:[],:the_role)
+ if @role.update_role params[:role][:the_role]
flash[:notice] = t 'the_role.role_updated'
redirect_to_edit
else
render :action => :edit
end
@@ -45,10 +45,10 @@
end
protected
def role_params
- params.require(:role).permit(:name, :title, :description)
+ params.require(:role).permit(:name, :title, :description, :the_role)
end
def role_find
@role = Role.find params[:id]
\ No newline at end of file