Sha256: 75028f47aeb067671566f47ac6f73f82ec553a72c0047cda3386c6a70549306d

Contents?: true

Size: 341 Bytes

Versions: 10

Compression:

Stored size: 341 Bytes

Contents

class ArticlesController < ApplicationController
  def create
    @article = Article.create article_params
    head :ok
  end

  def current_user
    "foobar"
  end

  private

  def article_params
    if PaperTrail.active_record_protected_attributes?
      params[:article]
    else
      params.require(:article).permit!
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-5.2.3/test/dummy/app/controllers/articles_controller.rb
paper_trail-6.0.0 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.2.3 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.2.2 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.2.1 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.2.0 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.1.1 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.1.0 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.0.1 test/dummy/app/controllers/articles_controller.rb
paper_trail-5.0.0 test/dummy/app/controllers/articles_controller.rb