Top "Before-filter" questions

Understanding before and after_filter

I have the following code right after my controller class declaration before_filter :load_form, :except => [:create, :update, :delete] …

ruby-on-rails-3 before-filter
undefined method `before_action' for ActionMailer

Trying to attach file to mail via before_action filter: class UserMailer < ActionMailer::Base before_action :add_logo_attachment …

ruby-on-rails-3 actionmailer before-filter
Multiple before_filter statements for correct_user and admin

I have a Group resource that I'm trying to set up with proper authorizations. The authorization logic I'm trying to …

ruby-on-rails authorization before-filter role-base-authorization
Skip before filter with Active Admin

I am using devise and recently added active admin, which created a separate table of admin_users to keep admins. …

ruby-on-rails devise ruby-on-rails-3.1 before-filter activeadmin
What order do before filters occur in?

What order do before filters occur in? Specifically, what order do the before_action filters occur in, in regards to …

ruby-on-rails ruby inheritance before-filter
Rails render and return in before_action, DoubleRenderError

In a controller action with a before_action, using render something and return does not actually cause the controller to …

ruby-on-rails ruby-on-rails-4 before-filter
RSPEC test index action with before_action filter

I have a before_action filter and want to test that the index action is only executed if the user …

ruby-on-rails ruby ruby-on-rails-4 rspec before-filter
Rails before_filter and action identification

I want to write a before_filter in my controller to identify the action which will execute next. This is …

ruby-on-rails before-filter
Stop execution after render in beforeFilter of CakePHP

In my CakePHP 2 application i have a problem with beforeFilter. In this thread it worked well. Because of old version …

cakephp cakephp-2.0 before-filter
Rails3 - How To Render 403 in before_filter w/o DoubleRender Error

I have a before_filter that checks the validity of an API key. If the key is invalid, I'd like …

ruby-on-rails-3 api before-filter