Actualiza a Redmine 3.4.13
This commit is contained in:
parent
807ff3308d
commit
ecddcaf1d3
224 changed files with 2222 additions and 1000 deletions
|
@ -91,8 +91,10 @@ class EnumerationsController < ApplicationController
|
|||
|
||||
def build_new_enumeration
|
||||
class_name = params[:enumeration] && params[:enumeration][:type] || params[:type]
|
||||
@enumeration = Enumeration.new_subclass_instance(class_name, enumeration_params)
|
||||
if @enumeration.nil?
|
||||
@enumeration = Enumeration.new_subclass_instance(class_name)
|
||||
if @enumeration
|
||||
@enumeration.attributes = enumeration_params || {}
|
||||
else
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
@ -105,6 +107,7 @@ class EnumerationsController < ApplicationController
|
|||
|
||||
def enumeration_params
|
||||
# can't require enumeration on #new action
|
||||
params.permit(:enumeration => [:name, :active, :is_default, :position])[:enumeration]
|
||||
cf_ids = @enumeration.available_custom_fields.map{|c| c.id.to_s}
|
||||
params.permit(:enumeration => [:name, :active, :is_default, :position, :custom_field_values => cf_ids])[:enumeration]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue