- @artist = Artist.edit(params[:id], @operators)
- @artist.attributes = params[:artist]
- @artist.overwrite @operators
-
- respond_to do |format|
- if @artist.save
- flash[:notice] = I18n.t('flash.notice.updated', :model => Artist.model_name.human)
- format.html { redirect_to '/home/configure' }
- format.json { head :ok }
- else
- flash[:notice] = I18n.t('flash.notice.not_updated', :model => Artist.model_name.human)
- format.html { render action: "edit" }
- format.json { render json: @artist.errors, status: :unprocessable_entity }
- end
- end
+ set_edit
+ @item.attributes = params[@my_model_class.item_name]
+ @item.overwrite @operators
+ render_update '/home/configure'