Sha256: b9563eaca716573d5bf1031ee248447cfe155bc69c27f6cd01e82c6f60cb3a4c

Contents?: true

Size: 413 Bytes

Versions: 14

Compression:

Stored size: 413 Bytes

Contents

# coding: utf-8

class Admin::ArticlesController < Admin::BaseController

  def edit
    @article = Article.find(params[:id])
    @article.build_page.save unless @article.page
  end

  def update
    @article = Article.find(params[:id])
    @article.update_attributes(article_params)
    render "edit"
  end

  def destroy
  end

  private
    def article_params
      params.require(:article).permit!
    end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
redditor-0.1.14 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.12 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.11 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.10 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.9 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.8 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.7 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.6 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.5 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.4 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.3 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.2 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.1 spec/dummy/app/controllers/admin/articles_controller.rb
redditor-0.1.0 spec/dummy/app/controllers/admin/articles_controller.rb