• Wincent
    Open
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

"before filter" in Ruby on RailsEdit

Created 5/25/2007, updated 5/18/2017

If you define a before_filter it must not return false or nothing will be done or rendered to the browser. There is extensive documentation on filters here, but it doesn’t seem to mention this:

http://api.rubyonrails.org/classes/ActionController/Filters/ClassMethods.html

Returning nil is fine.

  • ruby
  • rails
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell using React, Relay and GraphQL (with help from Git, Redis and Neovim).