3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/subform.rb', line 3
def edit_associated
@parent_record = params[:id].nil? ? active_scaffold_config.model.new : find_if_allowed(params[:id], :update)
@column = active_scaffold_config.columns[params[:association]]
@record = @column.association.klass.find(params[:associated_id]) if params[:associated_id]
@record ||= @column.association.klass.new
@scope = "[#{@column.name}]"
@scope += (@record.new_record?) ? "[#{(Time.now.to_f*1000).to_i.to_s}]" : "[#{@record.id}]" if @column.plural_association?
render :action => 'edit_associated'
end
|