similar to: need help with session

Displaying 20 results from an estimated 70000 matches similar to: "need help with session"

2014 May 13
0
super is not working on after_sign_in_path_for(resource)
I have this: class Users::SessionsController < Devise::SessionsController def after_sign_in_path_for(resource) super end super redirect to root_path and i dont want to do it. I need to redirect other view -- 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,
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello I have a rails 3 app and I am trying to implement the redirect back action at access denied for cancan. If I try this in my application_controller: rescue_from CanCan::AccessDenied do |exception| redirect_to :back end It gives the following error: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure
2010 Jun 08
1
session_options[:secure] resets session_id on every request
I''m working on an ecommerce site (in Rails 2.3) and I added: ActionController::Base.session_options[:secure] = true to ~/config/environments/production.rb Now, every time I add something to my shopping cart and navigate away I get a new session_id (which essentially empties my shopping cart). How can I get the continuity of my sessions back, while still having the session_id get set
2006 Feb 06
0
how can I retrieve a session based on the session-id
I am trying to mix Flash and RoR (for fileupload without pagerefresh) Unfortunately the requests originating from the flashplayer do not have the right sessionid. So I tried to hackaround with reading the _session_id form the cookie and sending it together with the fileupload POST from the flashplayer to the webserver. But how can i retrieve the session based on the session_id at my controller
2010 Aug 23
7
Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.
Hey all. I have two apps. One is a rails3 app and the other is a rails 2 app. Using proxying I am routing actions in the myapp.com/foo to the rails2 app. It almost works! I can set a session variable and a cookie variable on the first app (myapp.com) and then read them on the second app (myapp.com/foo). It only works the first time though. If I go back to myapp.com and then revisit
2011 Nov 02
1
getting devise to return json data when signing out
Hi all, In curl (the command line program), I can successfully log a user in using devise: def create respond_to do |format| format.json { if user_signed_in? return render :json => {:success => true, :errors => ["Already logged in."]} end resource = warden.authenticate!(:scope => resource_name, :recall =>
2010 Jul 07
1
what is a session stored via the active_record_store option unique to?
Hi, After a bunch of snooping in AWDWR and Railsguides I can''t reach a good understanding to the following question: What is a session stored via the active_record_store option unique to? In other words, how does rails bind the user to their session under the active_record_store option? This concern has arisen in the following way... ...I have two use levels in my app: 1) authenticated
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
So I''ve inherited a legacy application and I''m trying to work around the edges as I put an admin tool interface on top of the existing code base. I install Devise for user authentication, since I''ve used it in the past. I change none of the default code. And yet, on successful sign in, I get an error: Render and/or redirect were called multiple times in this action.
2010 Mar 24
3
flash error & fade away
this is my current code: #notice { border: solid 1px #99cc99; background-color: #e2f9e3; color: #006600; padding: 5px; margin-bottom: 5px; } #notice.error { border-color: #e2f9e3; background-color: #eeaaaa; color: #cc0000; } <% flash.each do |key, msg| %> <%= content_tag :div, flash[:error] || flash[:notice], :id => ''notice'', :class =>
2010 Jan 07
2
Find by looping thru array
Hello all, I''m in my third month of Ruby on Rails. I think it''s coming along fairly well. My current issue is this. I''m do a search based on string data some of which is very long. So I''m doing a similar match using "amatch" gem. When I have a 50% or greater match I store the id to an array. How can I do a find looping thru the array then send the
2010 Mar 24
4
grouping and acts_as_tree
hi, im using acts_as_tree and im not sure on how to group find-result. x = find.almost_all <p> <% for y in @x.ancestors.reverse %> <%= link_to h(y.title), page %> &gt; <% end %> </p> gives me a nice "breadcrum". but how is it possible to group the list lets say by the 1level or second level? thx -- You received this message because you are
2012 Nov 30
1
q@ request.request_method=='OPTIONS', ajax, post json
hi im reading through the topic above and trying to apply it to my app. as reference i found:http://leopard.in.ua/2012/07/08/using-cors-with-rails/ my prob is that i dont see the ''preflight'', meaning the first request prior the actual post, which should(?) deliver this: request.request_method==''OPTIONS'' the js code look like this: $.ajax ({ type:
2010 Jun 29
0
Rails session_id is not unique
We have been experiencing an issue in our environment (Jruby 1.4, Rails 2.3.5, Tomcat 5.5, Java 1.6) where duplicate session_ids are being created in the sessions table. We are assuming the only way this can happen is when 2 sessions are created at the exact same time on 2 different machines (we have 10 app servers running with config.threadsafe! on). Has anyone encountered this issue? It seems
2012 Mar 05
0
Rails 3 - How can you get access to current_user in the IRB console?
I''m doing some design/debugging in IRB and need to login a user and then be able to gain access to current_user in my efforts (I''m using Devise for authentication.) I found a sequence from SO that allows me to successfully login via IRB and access a page response: >> ApplicationController.allow_forgery_protection = false >> app.post(''/sign_in'',
2010 Sep 02
0
controller failing to read flash
I''m seeing some pretty strange behavior from the flash in my rails 2.3.8 app. I set the flash in a request, and then redirect. In the next request (the one redirected to), accessing the flash returns an empty hash, but the flash is stored and visible in the session. (rdb:21) session {:user_credentials=>"...", :session_id=>"...", :user_credentials_id=>1,
2012 Dec 03
2
Rails 3.2 session id nil until next request
Posted this on stack overflow earlier today here<http://stackoverflow.com/questions/13673969/rails-3-2-session-id-nil-until-next-request>, I really either don''t know what I''m doing, or I don''t understand how sessions are supposed to work! I''m connecting to rails from an Air app and communicating with JSON only. When the client sends a login request,
2010 Oct 24
2
Synatx highlighting in Ruby
Hello people, I was going thru Geshi http://qbnz.com/highlighter/ , I am wondering if any one has a Ruby syntax highlighting library so that I can use it in one of my projects. -- 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, send email to
2010 Nov 12
1
Devise after_sign_up_path_for - how to?
Hi, I''m new to devise and I''m having a problem overwriting a controller. After sign-up I want the user to go to a static page. In the controllers folder I have created users/registrations_controller.rb class Users::RegistrationsController < Devise::RegistrationsController def after_sign_up_path_for(resource) puts "If I coould see this..."
2014 Feb 07
0
need dynamic forms ui ideas for approval workflows
hi im looking into workflow approval systems and i need it for dynamic forms. meaning a user should be able to add various input types to a 'form' like on paper - but im not sure how to store these forms in AR any ideas? thx -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop
2010 Jun 11
2
How to use an active record store session model?
I have a toy rails app, 2.3.5 on Debian ''squeeze'', that uses the ActiveRecord session store. I can see that it set cookies and inserts rows into the database table ''sessions''. Inside a controller, how do I acquire a reference to the model object representing the current session? This used to be possible by calling ''session.model'' but in