Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Order of Rails Controller Callbacks

Order of Rails Controller Callbacks

Rails 4.x

Started GET "/" for 127.0.0.1 at 2017-05-19 14:17:18 +0200
  Processing by WelcomeController#index as HTML
    prepend_around_action
    prepend_before_action
    before_action
    append_before_action
    around_action
    append_around_action
  Rendered welcome/index.html.erb within layouts/application (0.0ms)
    append_after_action
    after_action
    prepend_after_action
  Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms)

Rails 3.x

Started GET "/" for 127.0.0.1 at 2017-05-19 14:17:18 +0200
  Processing by WelcomeController#index as HTML
    prepend_around_filter 
    prepend_before_filter 
    before_filter
    append_before_filter
    around_filter
    append_around_filter
  Rendered welcome/index.html.erb within layouts/application (0.0ms)
    append_after_filter
    after_filter
    prepend_after_filter
  Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment