Safe attributes for repositories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9876 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -47,7 +47,8 @@ class RepositoriesController < ApplicationController
|
||||
|
||||
def create
|
||||
attrs = pickup_extra_info
|
||||
@repository = Repository.factory(params[:repository_scm], attrs[:attrs])
|
||||
@repository = Repository.factory(params[:repository_scm])
|
||||
@repository.safe_attributes = params[:repository]
|
||||
if attrs[:attrs_extra].keys.any?
|
||||
@repository.merge_extra_info(attrs[:attrs_extra])
|
||||
end
|
||||
@@ -64,7 +65,7 @@ class RepositoriesController < ApplicationController
|
||||
|
||||
def update
|
||||
attrs = pickup_extra_info
|
||||
@repository.attributes = attrs[:attrs]
|
||||
@repository.safe_attributes = attrs[:attrs]
|
||||
if attrs[:attrs_extra].keys.any?
|
||||
@repository.merge_extra_info(attrs[:attrs_extra])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user