app/controllers/manifestations_controller.rb in enju_biblio-0.3.5 vs app/controllers/manifestations_controller.rb in enju_biblio-0.3.6

- old
+ new

@@ -428,18 +428,18 @@ # PUT /manifestations/1 # PUT /manifestations/1.json def update creators_params = manifestation_params[:creators_attributes] Manifestation.transaction do - @manifestation.update(manifestation_params.delete_if{|k, v| + @manifestation.assign_attributes(manifestation_params.delete_if{|k, v| k == 'creators_attributes' }) @manifestation.creators = Agent.new_agents(creators_params) end respond_to do |format| - if @manifestation.valid? + if @manifestation.save format.html { redirect_to @manifestation, notice: t('controller.successfully_updated', model: t('activerecord.models.manifestation')) } format.json { head :no_content } else prepare_options format.html { render action: "edit" } @@ -487,10 +487,10 @@ :repository_content, :required_role_id, :frequency_id, :title_alternative_transcription, :description, :abstract, :available_at, :valid_until, :date_submitted, :date_accepted, :date_captured, :ndl_bib_id, :pub_date, :edition_string, :volume_number, :issue_number, :serial_number, :content_type_id, :attachment, :lock_version, - :dimensions, :fulltext_content, :extent, + :dimensions, :fulltext_content, :extent, :memo, :parent_id, :serial, :statement_of_responsibility, {creators_attributes: [ :id, :last_name, :middle_name, :first_name, :last_name_transcription, :middle_name_transcription,