Method: Ems::ArticlesController#update
- Defined in:
- app/controllers/ems/articles_controller.rb
#update ⇒ Object
PUT /articles/1 PUT /articles/1.json
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'app/controllers/ems/articles_controller.rb', line 64 def update @article = Article.find(params[:id]) respond_to do |format| if @article.update_attributes(params[:article]) format.html { redirect_to edit_category_article_path(@article.category, @article), notice: 'Article was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit", :category_id => @article.category, :id => @article } format.json { render json: @article.errors, status: :unprocessable_entity } end end end |