Sha256: 4c351fa2697d3fe8d9d623925b0900c840183742bb0bf3be4c194daf91007a88

Contents?: true

Size: 433 Bytes

Versions: 28

Compression:

Stored size: 433 Bytes

Contents

class WidgetsController < ApplicationController

  def paper_trail_enabled_for_controller
    request.user_agent != 'Disable User-Agent'
  end

  def create
    @widget = Widget.create params[:widget]
    head :ok
  end

  def update
    @widget = Widget.find params[:id]
    @widget.update_attributes params[:widget]
    head :ok
  end

  def destroy
    @widget = Widget.find params[:id]
    @widget.destroy
    head :ok
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
paper_trail-2.7.2 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.7.1 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.7.0 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.6.4 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.6.3 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.6.2 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.6.1 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.6.0 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.5.2 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.5.0 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.4.1 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.4.0 test/dummy/app/controllers/widgets_controller.rb
bkwld-paper_trail-2.3.3 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.3.3 test/dummy/app/controllers/widgets_controller.rb
bkwld-paper_trail-2.3.2 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.3.2 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.3.1 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.3.0 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.2.9 test/dummy/app/controllers/widgets_controller.rb
paper_trail-2.2.8 test/dummy/app/controllers/widgets_controller.rb