search for: skip_before_filt

Displaying 20 results from an estimated 31 matches for "skip_before_filt".

Did you mean: skip_before_filter
2006 Mar 29
0
Bug with skip_before_filter?
There seems to be a bug with skip_before_filter using the :only or :except conditionals. Or am I using them completely wrong? I have this code: The result is that :test_filter is skipped for both index, and index_no_filter. application.rb # Filters added to this controller will be run for all controllers in the application. # Likewise, a...
2006 Oct 13
0
can you use only with skip_before_filter ?
I have a before_filter in my applicationController (application.rb) for protecting all pages in my app: before_filter :login_required Then in a product controller i have a skip_filter with the only clause to allow guest users to access that resource. #allow access to show only if guest skip_before_filter :login_required, :only => [ :show ] This worked fine, allowing guest users to view only the show action. The problem is that when i login and try to access the show resource i get errors from references to @current_user. Im using the restful authentication plugin. An extension of the acts...
2009 Mar 09
0
skip_before_filter :verify_authenticity_token make session data not accessible.
...I implemented image upload feature using swfupload. The submission from swfupload cause exception ActionController::InvalidAuthenticityToken (rails 2.2) - understandable because swfupload doesn''t send valid token. I try to temporarily turn off the checking in the controller by using "skip_before_filter :verify_authenticity_token", but strange thing happen: session data is not accessible - for example get current_user become nil, or login_required halt. Has anyone experienced this? Could someone tell what did I do wrong? Thanks - Chuong --~--~---------~--~----~------------~-------~--~----...
2008 May 06
12
Why before_filter is not working?
I have been scratching my head on this one for most of the day. Hopefully someone can help explain why before_filter isn''t working for my codes. In my Application controller, I have this: before_filter :login_required, :except => [:newacct, :create_newacct, :passwd_reset ] def login_required unless session[:user_id] flash[:notice] = "Please log in"
2008 Jan 11
0
trouble skipping before filter in controller
...everal before filters to apply to every request except for login and authenticate. So in my application controller I have before_filter :setup_user, :check_for_duplicate_user, :update_timestamp, :kick_if_inactive then in my user controller which contains the login and authenticate actions i have skip_before_filter :setup_user, :only => [:login, :authenticate] skip_before_filter :check_for_duplicate_user, :only => [:login, :authenticate] skip_before_filter :update_timestamp, :only => [:login, :authenticate] however, when I call login or authenticate the before filters are not being skipped. Can an...
2009 May 05
3
Unable to deactivate forgery protection
Hi, I just created a new Rails app that will be receiving some POSTed data from the outside so it must skip the verify_authenticity_token for some create actions. Although I have added: skip_before_filter :verifiy_authenticity_token I still get InvalidAuthenticityToken. In one of my other Rails app (created back in Rails 1.2.6 and updated to 2.3.2 over time) this skipping works perfectly though, has anything changed since? Do I need to do anything more? Thanks. -- Posted via http://www.ruby-for...
2006 Nov 04
3
role based authorization question
...ach? I know this will not work as is, and to force it to do so would violate MVC, but is there some other way to accomplish having something like this in a controller: loggedin=false; if session[:user] Applicant.find(session[:user]).roles.each{|r| loggedin=true if r.name== "admin"} end skip_before_filter :check_authentication, :check_authorization if loggedin Thanks, Howard -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060824/92154834/attachment-0001.html
2006 May 11
1
skipping filters
...have a simple login scheme in application.rb. Something like :requires_login is called in any controller as a before_filter. All is good, except I''m having trouble figuring out how to make the public login actions skip this before filter. Here''s what I have: application.rb skip_before_filter :requires_login, :only => [:login, :logout, :confirm_valid_login] my_controller.rb before_filter :requires_login, :except => [:list, :show] I can''t successfully pass authentication and what I believe is happening is that all the right things are happening up till the point...
2006 Apr 23
2
Check if current route == some route
I have a before_filter in ApplicationController in which I want to check if the current location is the same as a certain route, so that I only redirect non-logged in visitors to the "join" page if they''re not on that page already. The code I came up with is a bit ugly: redirect_to join_url unless (@logged_in or action_name == "join") I''m pretty sure
2009 Jun 04
4
ActionController::InvalidAuthenticityToken & :before
I have a form that submits search criteria and while it is processing I wanted to use a js function to indicate: <% form_remote_tag :update => ''mainbody'', :url => {:action => ''search''}, :before => "wait_message(''mainbody'',''S E A R C H I N G'')" do%> wait_message() executes but then when
2007 Dec 03
2
before_filter application => exclude some other controllers
Hello again, It''s possible to use before_filter in the application_controller, and exclude for some methods from other controllers ? i have a before_filter in application_controller that checks if the user is logged, if the time hasn''t expired, ... and I want to exclude some methods of this check, like the login. This ''login'' belongs to other controller. I
2008 Feb 07
4
text_field_with_auto_complete
I have the following in my view: <% form_tag :action => ''detail'' do %> Search for Sales Order Number:<br /> <%= text_field_with_auto_complete :sales_order, :id %>&nbsp; <%= submit_tag " Go "%> <% end %> And I have the following in my controller: auto_complete_for :sales_order, :id This worked fine in 1.5, but
2006 May 25
5
Setting a global before_filter action in application.rb
Can you set a global before_filter action in application.rb? So, for example, you could control authentication for all of the controllers in an app.? Obviously, you would need a way to reference actions by controller within this "global before-filter". Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2013 Sep 26
2
Login Problem
...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_by_email(resource_params[''email'']) if user_email if server_emails.include?(resource_params[''email'']) || params[:client_login] != nil if user_email.valid_password?(resource...
2006 Jan 04
5
Webservice External XMLRPC
...gt; [{:html=>:string},{:from=>:string}], :returns => [Customer] end class DirectSpoolService < ActionWebService::Base web_service_api DirectSpoolAPI def add(html,from) Customer.find(:first) end def remove end end class ApiController < ApplicationController skip_before_filter :login_required web_service_dispatching_mode :delegated web_service_scaffold :invoke web_service(:directspool) {DirectSpoolService.new} end The controller behaves fine when accessing it with : http://localhost:3003/api/invoke, and curl -d ''<?xml version="1.0"...
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
...use this in your controllers: # # before_filter :login_required # # To require logins for specific actions, use this in your controllers: # # before_filter :login_required, :only => [ :edit, :update ] # # To skip this in a subclassed controller: # # skip_before_filter :login_required # def login_required authorized? || access_denied end # Redirect as appropriate when an access request fails. # # The default action is to redirect to the login screen. # # Override this method in your controllers if you want to have special...
2006 Jan 07
2
Before filter...
I have a before filter in my application.rb, for every action and controller it gets run, except for one action. How can I see whats going on? And why it doesnt get run? Thanks joey__ -- Posted via http://www.ruby-forum.com/.
2006 Oct 09
1
restful authentication - filtering out login ??
i am unable to reach the login page when adding ''before_filter :login_required'' to the application controller. I HAVE added the following to my sessions controller ''before_filter :login_required, :except => [:new, :create, :destroy]'' I figured this would overload the app controller filter but i get this loop while it looks for sessions/new and isnt allowed
2008 Sep 30
0
undefined method `authenticate_with_http_basic' for #<SessionsController:0xb6c47c44>
...ruby script\generate authenticated user sessions ...output omitted... I specified everything.. It worked fine upto 500 pages.. later, class SessionsController < ApplicationController # Be sure to include AuthenticationSystem in Application Controller instead # include AuthenticatedSystem skip_before_filter :login_required He told me to comment the authenticated system and use skip_before.. i done it and the " include AuthenticatedSystem " line added to the application.rb file... now i created the new migration tasks and created the controller when i need to access the link '' ht...
2009 Jan 14
0
ActionController::InvalidAuthenticityToken
You will need: skip_before_filter :verify_authenticity_token in your sessions_controller.rb --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3Mb...