Displaying 9 results from an estimated 9 matches for "prepend_before_filter".
2006 Apr 03
4
Clearing out filters in ActionController
I want to run a single filter in my application.rb file, and then if a
certain condition is true, end the action''s processing immediately.
Right now I''m using prepend_before_filter to ensure that it gets run
first, but some of my around_filters are still being processed. Is
there a way that I can clear out all the filters that should be run?
Basically it''ll look something like this:
class ApplicationController < ActionController::Base
prepend_before_filter :c...
2007 Feb 14
2
prepend_before_filter
I''ve got a couple of before_filters that need to run in a specific order. One does a redirect_to if a session variable isn''t set. The other does a find which will fail if the session variable isn''t set. So they need to run in that order. But prepend_before_filter doesn''t seem to be working as advertised. Anybody got any insight? I''m still running on 1.1.6
TIA,
Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post...
2013 Sep 26
2
Login Problem
...sers"."id" = 2
LIMIT 1
Redirected to http://localhost:3000/
Filter chain halted as :require_no_authentication rendered or redirected.
Inactive users still login, but while debugging, it doesn''t show anything.
It goes to the else part, still logs in.
session_controller:-
prepend_before_filter :require_no_authentication, :only => [ :new, :create ]
prepend_before_filter :allow_params_authentication!, :only => :create
prepend_before_filter { request.env["devise.skip_timeout"] = true }
skip_before_filter :verify_authenticity_token
def create
user_email = User.find...
2006 Jul 18
6
before_filter chains and halting at an arbitrary filter
Hi--I''m trying to implement a 2-level authentication system, where I
have one before_filter which does general user authentication, and
another which does further authorization for a specific controller. I
have it set up as follows:
before_filter :authorize_level_2
prepend_before_filter :authorize_level_1
which causes authorize_level_1() to run, and then authorize_level_2().
However, the problem is that I want, if authorize_level_1 decides to
redirect someone back to the login page, to not run authorize_level_2.
Unfortunately it looks like this is what happens, and since
auth...
2006 May 08
2
How to set the default language in GetText?
How to set the default language in GetText?
The default language of GetText is en,and I want to change it to another
language,and also keep the ability to change to any other languages by
just click the according href.
Currently I use:
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html;
2005 Nov 23
1
How to set flash for before_filter :login_system ?
Hello all,
I''m using Login Generator ACL
System<http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem>
I want to know if there is a way to set the flash(:notice) before the
before_filter is processed so that the flash() is available on my login page
?
IE: "regular" user changes URL to an "admin" page, then I want the login''s
flash to say
2013 Jun 16
0
Monkey patching a gem's controller method
...key = ''success''
> end
>
> message = find_message(kind, options)
> flash[key] = message if message.present?
>
> end
> end
But now I get the following error on any Devise-related action:
*Routing Error: undefined method `prepend_before_filter'' for
Devise::SessionsController:Class*
What am I doing wrong?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubsc...
2006 Feb 10
14
dynarch calendar and calendar helper usage
...ariable or method `date_format'' for
#<PlacementsController:0xb78f9ef4>
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
./script/../config/../app/controllers/application.rb:9:in `localize''
Makes sense... the lines in application.rb are:
prepend_before_filter :localize
def localize
# determine locale and set other relevant stuff
ActiveRecord::Base.date_format = date_format
end
I''m not entirely clear on where to put the other sections...
#1
ActiveRecord::Base.class_eval do
include BoilerPlate::Model::I18n
end
#2
require '...
2006 Jul 27
9
CalendarHelper
Has anyone had any luck using the CalendarHelper plugin at
http://wiki.rubyonrails.com/rails/pages/CalendarHelper recently?
I''m scratching my head over the following error when I look at any page
in my application:
NameError in CalendarController#index
undefined local variable or method `date_format'' for
#<CalendarController:0x24ccd4c>
RAILS_ROOT: