lib/active_scaffold/actions/update.rb~ in active_scaffold-3.1.11 vs lib/active_scaffold/actions/update.rb~ in active_scaffold-3.1.12

- old
+ new

@@ -16,11 +16,11 @@ end # for inline (inlist) editing def update_column do_update_column - render :action => 'update_column', :locals => {:column_span_id => params[:editor_id] || params[:editorId]} + @column_span_id = params[:editor_id] || params[:editorId] end protected def edit_respond_to_html if successful? @@ -90,12 +90,14 @@ # we have to revert these changes if validation fails raise ActiveRecord::Rollback, "don't save habtm associations unless record is valid" end end rescue ActiveRecord::RecordInvalid + self.successful = false + flash[:error] = $!.message rescue ActiveRecord::StaleObjectError @record.errors.add(:base, as_(:version_inconsistency)) - self.successful=false + self.successful = false rescue ActiveRecord::RecordNotSaved @record.errors.add(:base, as_(:record_not_saved)) if @record.errors.empty? self.successful = false end end