Top "Before-filter" questions

Skip before_filter in Rails

Names and objects have been simplified for clarity's sake. The basic concept remains the same. I have three controllers: dog, …

ruby-on-rails inheritance before-filter
before_filter with parameters

I have a method that does something like this: before_filter :authenticate_rights, :only => [:show] def authenticate_rights project = …

ruby-on-rails ruby ruby-on-rails-3 before-filter
How can I specify the order that before_filters are executed?

Does rails make any guarantees about the order that before filters get executed with either of the following usages: before_…

ruby-on-rails before-filter
Specify which controllers to exclude from before_filter

I'm using devise for authentication and have some before_filters in my application controller. Issue I'm seeing is that when …

ruby-on-rails devise before-filter
How to "update_attributes" without executing "before_save"?

I have a before_save in my Message model defined like this: class Message < ActiveRecord::Base before_save lambda { …

ruby-on-rails ruby-on-rails-3 before-filter update-attributes before-save
Is "proc" required with conditional before_action/before_filter?

Behold, a before_filter: class ThingController < ApplicationController before_filter :check_stuff, :if => proc {Rails.env.production?} end During …

ruby-on-rails-4 before-filter
Rails before_filter for specific actions in controller

def new before_filter do redirect_to "/" unless current_admin || current_company flash[:notice] = 'You dont have enough permissions to …

ruby-on-rails ruby ruby-on-rails-3.1 devise before-filter
before_filter not cancelling action

I'm having trouble getting before filters to work in a Rails app I have recently upgraded from 1.9(?) to 2.3.11. To try …

ruby-on-rails before-filter
Rails 3 way of doing skip_before_filter, :only

In rails 2.8 we can write skip_before_filter like this skip_before_filter :require_login, :only => [:create,:new,:accept] …

ruby-on-rails ruby before-filter
RSpec in Rails: How to skip a before_filter?

I am trying to test my controller and maintain separation of concerns. The first concern is "Who is able to …

ruby-on-rails rspec separation-of-concerns before-filter