search for: remember_m

Displaying 20 results from an estimated 27 matches for "remember_m".

Did you mean: remember_me
2012 Apr 25
8
showing error (gsub) when switching from session to cookies
....2/lib/action_controller/cookies.rb:80:in `set_cookie'' C:/Users/Amir/Downloads/IR/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cookies.rb:65:in `[]='' app/controllers/user_controller.rb:27:in `login'' user_controller if request.get? @user = User.new(:remember_me => cookies[:remember_me] || "0") elsif param_posted?(:user) @user = User.new(params[:user]) user = User.find_by_screen_name_and_password(@user.screen_name, @user.password) if user user.login!(session) if @user.remember_me == "1" cookies[:remember_me] = { :value => "1...
2010 Jul 31
4
Exception: can't dup Symbol
Hey everybody, I''m trying to test a little piece of code I wrote, and I get the following error: Exception: can''t dup Symbol It happens in the following line: try_to_login @valid_user, :remember_me => "1", where the function try_to_login is: def try_to_login(user, options = {}) user_hash = {:screen_name => user.screen_name, :password => user.password} user_hash.merge!(options) post :login, :user => :user_hash assert logged_in? end I can''t isol...
2010 May 25
2
Rails 2.3.6 and Authlogic 2.1.4 or 2.1.3
In the test environment, logging out and back in is not working for me. The log for the first login looks like this: Processing UserSessionsController#create (for 127.0.0.1 at 2010-05-24 19:53:57) [POST] Parameters: {"user_session"=>{"remember_me"=>"true", "password"=>"[FILTERED]", "login"=>"test"}, "action"=>"create", "controller"=>"user_sessions"} User Load (0.5ms) SELECT * FROM `users` WHERE (LOWER(`users`.login) = ''...
2006 Nov 08
1
controller.session not same as session?
> context "A user logging out" do > fixtures :users > controller_name :account > > setup do > login_as :quentin > users(:quentin).remember_me > request.cookies["auth_token"] = cookie_for(:quentin) > end > > def logout > get :logout > end > > specify "should unset :user in session" do > logout > controller.session[:user].should_be_nil > end > >...
2013 Aug 22
1
duplicated log lines in console
...tarted POST "/users/sign_in" for 127.0.0.1 at 2013-08-22 12:46:39 +0200 Started POST "/users/sign_in" for 127.0.0.1 at 2013-08-22 12:46:39 +0200 *** Successful login with email_id : {"login"=>"yves", "password"=>"[FILTERED]", "remember_me"=>"0"} *** *** Successful login with email_id : {"login"=>"yves", "password"=>"[FILTERED]", "remember_me"=>"0"} *** Started GET "/oauth/authorized_applications" for 127.0.0.1 at 2013-08-22 12:46:40...
2010 Sep 19
4
Rails 2.3.8 - InvalidAuthenticityToken problem. URGENT!
...got all kinds of problems with login. Processing UsersController#login (for 188.177.122.179 at 2010-09-19 12:21:09) [POST] Parameters: {"commit"=>"OK", "authenticity_token"=>"/ Y0aZETCsMhyI3CkrZJK6O2NaLEoi+LRe8ZuDPWU9kc=", "user"=>{"remember_me"=>"0", "password"=>"xxxxx", "screen_name"=>"rune"}} ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): /home/heroku_rack/lib/static_assets.rb:9:in `call'' /home/heroku_rack/lib/last_a...
2009 Apr 29
7
problem with nil.user
Hi all, I''ve put new code into my app so that an administrator will have extra privileges (administer users, edit pages). The error is: ''Couldn''t find User without an ID'' So the app is looking for a logged in user when the homepage is accessed. Heres my code: site/index view: <% if is_logged_in? and logged_in_user.has_role?(''Moderator'')
2008 Aug 30
3
Working with sessions in beast forum
...failed_login "Invalid login or password, try again please."[:invalid_login_message] end end def successful_login cookies[:login_token] = {:value => "#{current_user.id};#{current_user.active_login_key}", :expires => 1.year.from_now.utc} if params[:remember_me] == "1" redirect_to CGI.unescape(params[:to] || home_path) end end If anyone could help, I''d really appreciate it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk...
2009 Jul 13
6
first app on Dreamhost with Passenger : "rails needs to know your username and password" ?
I am trying to deploy my first rails app with Dreamhost. I ftp''d over my existing app, turned on Passenger and pointed it to my /public directory. When I go to ''www.mydomain.com'' I get the ''Ruby on Rails: Welcome aboard'' default page, including the following: Getting started Here’s how to get rolling: 1. Create your databases and edit
2006 Feb 11
2
Session ID in a cookie?
I''ve been looking around for how to store the session ID in a cookie. The "Agile Web Development with Rails" books seems to indicate that this is done by default with Rails. But I don''t see a cookie being set in my browser. (yeah, they''re enabled) I poked through the RForum code to find something referencing "cookies" but nothing came up. Does
2008 Mar 07
0
ActiveRecordStore: cleanup & avoiding duplication
...13/rails-how-to-find-out-who-is-online/ - http://www.williambharding.com/blog/?p=99 This is what I currently do: IN SESSION CONTROLLER def create self.current_user = User.authenticate(params[:login], params[:password]) if logged_in? session.model.user_id = current_user.id if params[:remember_me] == "1" self.current_user.remember_me end current_user.update_attribute(:online, true) redirect_back_or_default(''/'') else render :action => ''new'' end end def destroy self.current_user.forget_me if logged_in? reset_se...
2011 Jun 13
0
Devise Authorization Error
...;50%"> <%= f.label :password %> </td> <td width="50%"> <%= f.password_field :password %> </td> </tr> <% if devise_mapping.rememberable? -%> <tr> <td width="50%"> <%= f.label :remember_me %> </td> <td width="50%"> <%= f.check_box :remember_me %> </td> </tr> <% end -%> </table> <br /><br /> <%= f.submit "Sign in" %> <% end %> <%= render :partial => "dev...
2010 Jul 13
1
NoMethodError in UsersController#show
...><label class="block" for="password">Password</label> <%= password_field_tag ''password'' %></p> <!-- Comment this if you don''t want this functionality --> <p><label for="remember_me">Remember me:</label> <%= check_box_tag ''remember_me'' %></p> <p><%= submit_tag ''Log in'', :class => "btn", :id => "login_btn" %> <%= link_to "Sign Up", new_us...
2007 Feb 10
5
acts_as_authenticated strangeness
...ot;Incorrent login" self.current_user = User.authenticate(params[:login], params[:password]) if logged_in? session[:username] = params[:login] user=User.find_by_login(params[:login]) session[:role]=user.organisation session[:user_id]=user.id if params[:remember_me] == "1" self.current_user.remember_me cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at } else flash[:notice] = "Logged in successfully" end redirect_back_or_de...
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,
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
...word) end end # Called from #current_user. Finaly, attempt to login by an expiring token in the cookie. def login_from_cookie user = cookies[:auth_token] && User.find_by_remember_token(cookies[:auth_token]) if user && user.remember_token? user.remember_me cookies[:auth_token] = { :value => user.remember_token, :expires => user.remember_token_expires_at } self.current_user = user end end end ==========================end authenticated_system.rb file======================== --~--~---------~--~----~------------~-------...
2007 Oct 09
4
Camping and sessions proposal.
Hi Campers, from the discussions gathered around, the current Camping sessions don''t seem to be satisfying. ActiveRecord doesn''t seem to handle hashid as an identifier, plus it doesn''t seem to be fully consistent across the various RDBMS. On the other hand, the scope of the project does not permit to implement all kind of client persistence. Secure sessions with
2010 Aug 14
10
Redirecting after logging in
Hey everybody, I''m trying to make an example of a small networking site, and when I log in a user, it should redirect and show his profile, but I get the following error: NoMethodError in User#index Showing app/views/user/index.html.erb where line #5 raised: undefined method `screen_name'' for nil:NilClass Extracted source (around line #5): 2: Your basic information 3:
2010 Feb 07
0
Authlogic Oauth problem with Remember Me
...cript type="text/javascript"> var e = document.getElementById("new_user_session"); e.submit(); </script> </body> </html> I''m trying to get Remember Me to work now, without success. I added this line: <%= hidden_field_tag ''user_session[remember_me]'', ''1'' %> to the above form, but that doesn''t appear to work; I still get redirected to Twitter (after restarting the browser). I''d like to be able to get Remember Me behavior out of the registration, too, if that''s possible. So the user...
2008 Aug 01
0
Help with Access Control
...ew_salt self.crypted_password = User.encrypted_password(self.password, self.salt) end def remember_token? remember_token_expires_at && Time.now.utc < remember_token_expires_at end # These create and unset the fields required for remembering users between browser closes def remember_me self.remember_token_expires_at = 2.weeks.from_now.utc self.remember_token = encrypt("#{email}-- #{remember_token_expires_at}") save(false) end def forget_me self.remember_token_expires_at = nil self.remember_token = nil save(false) end private...