Sha256: 459efc4574b6d29e2a94ac4c558c11836725c707ece171a5e827f81a14a0faf9

Contents?: true

Size: 359 Bytes

Versions: 4

Compression:

Stored size: 359 Bytes

Contents

class BunnyController < ApplicationController

  before_actions do
    all { @bunny = action_name }
  end

  around_actions do
    only(:two) do |controller, action|
      @bunny += "-around two-"
      action.call
      @bunny += "-around two-"
    end
  end

  def one
  end

  def two
    @bunny += " -single-responsibility- "
  end

  def three
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
before_actions-2.0.3 spec/dummy/app/controllers/bunny_controller.rb
before_actions-2.0.2 spec/dummy/app/controllers/bunny_controller.rb
before_actions-2.0.1 spec/dummy/app/controllers/bunny_controller.rb
before_actions-2.0.0 spec/dummy/app/controllers/bunny_controller.rb