similar to: prepend_before_filter

Displaying 20 results from an estimated 10000 matches similar to: "prepend_before_filter"

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().
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
2006 May 16
2
before_filter and the application controller
Hi there, I''m having a bit of an issue with my before_filter. I know that the filters put in the application.rb controller are global for all the controllers. In my application filter I''d like to allow access to the RSS feed method in a ''member'' controller and skip the login checks that the before_filters are currently performing. In my application my filters
2006 Jul 02
3
2 before_filters, only want one to render something
I have two before_filters for a few of my controllers. They are running my own methods authorize and admin_authorize. authorize is called on just about every action to make sure that a user is logged in. admin_authorize is called on about 80% of the actions and is used to make sure that a user is an administrator. If a user tries to access an admin_authorize protected action without being
2013 Sep 26
2
Login Problem
Hello All, I am getting a problem while login for inactive users. While login I am getting - Processing by Devise::SessionsController#new as HTML User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1 Redirected to http://localhost:3000/ Filter chain halted as :require_no_authentication rendered or redirected. Inactive users
2008 Nov 21
15
Switching the version of Rails that an app uses
Hi All, I’ve got a few versions or Rails installed and I''d like to run an App I’m developing with various versions of Rails. I heard of two ways to switch the version of Rails that an app uses: 1. Use GitHub as described by http://kylecordes.com/2008/04/30/git-windows-go/ . But that requires using Bash in a Command Window and more steps than I want to go through. 2. Alter
2007 Jan 31
6
Using hash.keys - why doesn't it display in order created
I am using .keys on a hash to create an array that is than displayed in a view with .each - why does it not display the keys in the order added to the hash? I would like to controll how the array is displayed - I want the checkboxes to display like I added them to the hash, but it doesn''t - I can''t figure out how it is displayed, when I change the order of the hash it
2007 Jan 29
8
Cluster 3 mongrel servers residing in different machines (Windows)
Hi All, Machine A: has Apache 2.2 doing load balancing, also has DB and 8 mongrel processes I''m using mongrel_cluster . Now, I want to run Mongrels on Machine''s B and C (ie Cluster 3 Mongrels in three different machines). Is this possible? If possible then, please describe me the steps required (I''m using windows machines, and already losdt one week :-( ) Best
2006 Apr 25
2
Bug in Rails 1.1 implementation of before_filters
I just spent a few hours tracking down a bug in Rails 1.1, so I thought I''d post the issue and a workaround just in case anyone else hits it. I designed a security enhancement so that controller methods can be protected by preceding them with a role. The standard Ruby method_added() callback is used to detect when controller methods are added, and then I manipulate the
2007 Mar 13
7
Form with subforms
Hi, I''m looking for a way to implement subforms. For example, a form where you can add clients, and at the same time enter contactpersons for this client. I''ve been looking around, reading ebooks, etc, but can''t seem to find a good example/tutorial for something like this. So I would be very thankful if someone could point me in the right direction. Thanks, Sven
2006 Sep 15
7
OT: TinyMCE in Rails
I''m having a problem getting the text area the size I want it to be. In my view at the top I have this init calls <script type="text/javascript" > tinyMCE.init({ mode: "textareas", theme: ''advanced'', theme_advanced_toolbar_location: ''top'' }); </script> Then in my form: <%= text_area
2008 May 22
9
Retrieving Mutliple Records using find_by_*
I was hoping that AR''s find_by_* magic methods would help me retrieve multiple items somewhat like the following: names_to_find = [''Larry'', ''Moe'', ''Curly''] found_people = Person.find_by_name(names_to_find) Is there a way to accomplish this using find_by_* (or even find(:all) using some sort of conditions) or must I resort to SQL
2007 Aug 07
1
core team email address?
Anybody know if the old rubyonrails.org email address is still valid for questions to the core team? Thanks, Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this
2006 Apr 21
9
Yet another dry question..
One of these days I''ll figure this out, but in the meantime help me be a better programmer by eliminating some excess code: I''m trying to check to see if somebody trying to view/edit/update a product is the owner. In my scaffold I have this code that works: def edit @owner = Product.find(params[:id].to_i) if @owner.user_id == @user.id @product =
2007 Mar 09
2
Blank fields getting validated
Hi, I am not sure if this is already answered in this list. I couldn''t find an answer. So I am posting the question. I have multiple validations for a field. For example: validates_presence_of :contact_email validates_format_of :contact_email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => "is not a valid email
2007 May 11
2
Ajax, buttons, and firefox
I created a button_to_remote function that I use to call :toggle_blind visual_effect :toggle_blind, ''div_id'' It works great on Safari, Opera, IE, but in firefox the button does nothing. Is there a problem with firefox. I can''t seem to find much online about this issue. -- Amos King Ramped Media USPS Programmer/Analyst St. Louis, MO Looking for something to do?
2006 Oct 09
3
text_field how to ?
I have a text field and want to let users insert multiple values - If I type one two , the sql statement is ''1 2'' if i put a comma between it turns it to 1\,\2 I need it to do ''1'',2'' I tried some regex but no luck because whatever I do to format I''m getting back slashes. Anything ? Stuart -- http://en.wikipedia.org/wiki/Dark_ambient
2007 Dec 03
8
automatic 'verify :xhr => true' for methods ending with _xhr
hey guys, i am writing a couple of actions which are only used with an xhr. I ''protect'' them all against a direct access with the ''verify'' method in the controller verify :only => ..., :xhr => true it would be cool if the system would automatically recognize the xhr actions and protect them ... i want to postfix methods with ''_xhr'' and
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;
2006 Oct 10
4
Prototype Tutorials?
Hi, Can anyone please point me in the direction of a good prototype tutorial? I''m not sure if one exists yet or not but I havn''t been able to find a comprehensive one yet. TIA Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send