search for: store_loc

Displaying 20 results from an estimated 23 matches for "store_loc".

Did you mean: store_ldt
2008 Nov 05
3
Problems w/ before_filter getting ignored
Hello, I''m setting up an authentication module that will be called from application.rb. I want to save a rrequest.request_uri into a session to be used as a place holder that will take users back to the page they were on before they logged in. I''m trying to call the store_location method for all methods EXCEPT login by putting login in an except before filter. For some reason, when I login the last request.request_uri address that is stored in the session is /login. For some reason, the store_location method is still getting called when the login method is called a...
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
...rride this method in your controllers if you want to have special # behavior in case the user is not authorized # to access the requested action. For example, a popup window might # simply close itself. def access_denied respond_to do |format| format.html do store_location redirect_to new_session end format.xml do request_http_basic_authentication ''Web Password'' end end end # Store the URI of the current request in the session. # # We can return to this location by calling #redi...
2008 Dec 16
20
step definitons to check login
...ate a simple login test from cucumber features. The feature statement is: Given the user is not logged in The step definition for this is confounding me. In the application_controller the authlogic tutorial recommends the following: private def require_user unless current_user store_location flash[:notice] = "You must sign in to access this page" redirect_to new_user_session_url return false end end def require_no_user if current_user store_location flash[:notice] = "You must be logged out to access this p...
2005 Mar 28
0
Handling return from modal pages on rails
Hi List, I didn''t like the way store_location worked in rails. It doesn''t know you''ve pushed the "back" button, and it always returns to the top of a page. On a large page, the part you were looking at would no longer be on the screen. People try to deal with this using an AJAX hack, but it seems to me that...
2006 Jan 29
3
SHLG and lib dir
...authorize?(member) # def login_required if not protect?(action_name) return true end if member? and authorize?(@session[''member'']) return true end # store current location so that we can # come back after the user logged in store_location # call overwriteable reaction to unauthorized access access_denied return false end ... Any ideas? thanks, b
2007 Feb 18
2
SerializationTypeMismatch in Production Mode
...bute'' In development, it works fine. In fact, if I set to false config.cache_classes in production.rb, it works fine. The first time you hit the page, it works fine. Upon refresh, it returns that error. This happens with both webbrick and litespeed. The controller code is: def new store_location if request.env["HTTP_REFERER"] params[:my_id] = "survey" if request.env["HTTP_REFERER"].include? "survey" end @question = Question.new @question.answers_container = Array.new(2, "") @question.creator_message = current_...
2005 Mar 07
2
Login generator question
Hello I''m using the login generator on my application, and I found a problem with it. My application is a rack inventory thing, which shows a rack with machines and KVMs and you can click on a rack item to show/edit/destroy it. The edit and destroy actions are protected by the login generator. Now say a user clicks on "destroy" for some machine. He''ll be shown the
2009 Oct 28
1
Authlogic Page View Authentication Help
...rent_user_session) @current_user_session = UserSession.find end def current_user return @current_user if defined?(@current_user) @current_user = current_user_session && current_user_session.user end def require_user unless current_user store_location flash[:notice] = "You must be logged in to access this page" redirect_to new_user_session_url return false end end Now I want only users to be logged in to upload photos. So if the hit the upload link it takes them to a page, and the page tells them they have to log...
2006 Aug 03
3
Calling/Executing javascript functions from controller
...tialize] def index @session[:mode] = ''view'' @map = GMap.new("map") render :update do |page| page.call("resizeMap") end @map.control_init(:large_map => true, :map_type => true) @map.center_zoom_init([38.539506, -121.757172],13) store_location end end This as expected does not work, it spits of the try{blah blah} catch stuff. Any help is greatly appreciated! Russ -- Posted via http://www.ruby-forum.com/.
2006 Jul 29
2
Instance Variables within Controller during AJAX request
...9;view'', ''build'', ''search'' My controller looks like this: class RandomController < ApplicationController before_filter :login_required, :except => [:index, :initialize] def initialize @mode = ''view'' end def index store_location end def update_mode render :update do |page| page[@mode].className = ''tab'' page.alert(@mode) @mode = params[:id] page[@mode].className = ''tab active'' end end end Now, I''m using link_to_remote for all of the bu...
2008 Apr 03
3
somebody help me to get previous page url in RoR
hi all, im having a view page called "edit" and im having a back button in it.im using this edit view page in many place of my application.i want to go back to the page which calls this "edit" page no matter what that page is.so somebody please help me to get the previous page url in ruby on rails.waiting for the response. regards, karthik. -- Posted via
2008 Jan 16
5
named route new_session not working
Anyone have any idea why a named route would NOT work? I did rake routes to make sure it was there and it was but for some reason new_session doesn''t work. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2009 Dec 25
18
rescue_from ActionController::RoutingError II
...@current_user_session) @current_user_session = UserSession.find end def current_user return @current_user if defined?(@current_user) @current_user = current_user_session && current_user_session.record end def require_user unless current_user store_location flash[:notice] = "You must be logged in to access this page" redirect_to new_user_session_url return false end end def require_no_user if current_user store_location flash[:notice] = "You must be logged out to access t...
2006 Nov 04
0
filter function with parameter
...uot; + the_action p "-----------------------" if not protect?(action_name) return true end if @session[:backend] and authorize?(@session[:backend]) return true end # store current location so that we can # come back after the user logged in store_location # call overwriteable reaction to unauthorized access access_denied return false end an user has a role, and a role has many modulepermissions like module: books , actions: create, read, edit, ..... in my controller i have this before_filter :module_backend_required(''...
2006 Apr 02
0
login_engine - redirect
I have installed the login_engine into my project, everything works as expected, get an emaiil to confirm login etc , but can''t get the re-direct back to where the login is screen is called in the controller, has anyone faced the same problems, or found a solution. have user store_location etc. if anyone has a code snippet, would be great to look at. best regards Sufi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060402/9fb9ee90/attachment.html
2008 Jan 17
0
It seems to be a restful_authentication bug (was Re: Re: named route new_session not working)
...rry for the ambiguity. I will work on being more descriptive. :) > > In the method access_denied in the file authenticated_system.rb from > restful athentication, it generates this: > > def access_denied > respond_to do |format| > format.html do > store_location > redirect_to new_session # <---- NOTICE > end > format.xml do > request_http_basic_authentication ''Web Password'' > end > end > end > > Everytime I hit a ''login_required'' are...
2006 Aug 03
0
N00b question...but here it goes
...def index @session[:mode] = ''view'' @map = GMap.new("map") render :update do |page| page.call("resizeMap") end @map.control_init(:large_map => true, :map_type => true) @map.center_zoom_init([38.539506, -121.757172],13) store_location end end This as expected does not work, it spits of the try{blah blah} catch stuff. Any help is greatly appreciated! Russ -- Posted via http://www.ruby-forum.com/.
2008 Jul 12
1
Re: Re stful_authentication, Internet Explorer, and unwanted http basic dialog
...ew_session_path. > > -J. > > On Jun 26, 2008, at 11:53 PM, Chris Bartlett wrote: > >> >> The issue is in this method of authenticated_system.rb: >> >> def access_denied >> respond_to do |format| >> format.html do >> store_location >> redirect_to new_session_path >> end >> format.any do >> request_http_basic_authentication ''Web Password'' >> end >> end >> end >> >> For some reason Internet Explorer is fal...
2006 Jun 01
5
History plugin
Hello, I felt annoyed enough when having to redirect user back to their previous location in a hackish way that I wrote this plugin. It avoids storing POST and Ajax request. It also has a facility to specify actions not to store in the history. If you are interested, it''s there: http://blog.cosinux.org/pages/rails-history See you all, Damien -- Damien MERENNE
2012 Dec 03
2
Stop User from Changing URL
...r < ApplicationController before_filter :signed_in_employee, only: [:index, :edit, :update] before_filter :correct_employee, only: [:edit, :update] etc etc private def signed_in_employee unless signed_in? store_location redirect_to signin_path, notice: "Please sign in to access this page." end end def correct_employee @employee = Employee.find(params[:id]) redirect_to(root_path) unless current_employee? (@employee...