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-filterI 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-filterDoes rails make any guarantees about the order that before filters get executed with either of the following usages: before_…
ruby-on-rails before-filterI'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-filterI 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-saveBehold, a before_filter: class ThingController < ApplicationController before_filter :check_stuff, :if => proc {Rails.env.production?} end During …
ruby-on-rails-4 before-filterdef 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-filterI'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-filterIn 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-filterI 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