Use safe_attributes in GroupsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9746 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -63,7 +63,8 @@ class GroupsController < ApplicationController
|
||||
# POST /groups
|
||||
# POST /groups.xml
|
||||
def create
|
||||
@group = Group.new(params[:group])
|
||||
@group = Group.new
|
||||
@group.safe_attributes = params[:group]
|
||||
|
||||
respond_to do |format|
|
||||
if @group.save
|
||||
@@ -83,9 +84,10 @@ class GroupsController < ApplicationController
|
||||
# PUT /groups/1.xml
|
||||
def update
|
||||
@group = Group.find(params[:id])
|
||||
@group.safe_attributes = params[:group]
|
||||
|
||||
respond_to do |format|
|
||||
if @group.update_attributes(params[:group])
|
||||
if @group.save
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
format.html { redirect_to(groups_path) }
|
||||
format.xml { head :ok }
|
||||
|
||||
Reference in New Issue
Block a user