Usually in Rails, if you specify a before_filter in the base controller ‘ApplicationController’ (in application.rb), every other controller in that app inherits that filter, so that even if you specify a before_filter in another controller … the filter in application.rb always runs
Example:
class ApplicationController < ActionController::Base before_filter :check_login end |
class UploadsController < ApplicationController before_filter :get_data end |
The :check_login method is always run even though UploadsController specifies another before_filter.
(You can stop this behavior by specifying a skip_before_filter :check_login in the Uploads Controller)
However if you take this mindset with you to cakephp Continue reading