Skip to content

Instantly share code, notes, and snippets.

@WaKeMaTTa
Last active July 29, 2019 12:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save WaKeMaTTa/18064e0c9d0e436bc35d5045df05ee20 to your computer and use it in GitHub Desktop.
Save WaKeMaTTa/18064e0c9d0e436bc35d5045df05ee20 to your computer and use it in GitHub Desktop.
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