search for: usersessions

Displaying 20 results from an estimated 24 matches for "usersessions".

Did you mean: usersession
2010 Nov 15
0
Problem testing Authlogic UserSession
...sion.rb class UserSession < Authlogic::Session::Base end user_sessions_controller_spec.rb require ''spec_helper'' def user_session_create @user = Factory.create(:user) @user_session = UserSession.create(:email => @user.email, :password => @user.password) end describe UserSessionsController do before(:each) do :activate_authlogic end describe "create a user session" do it "creates a user session using the user credentials" do user_session_create @user_session.email.should == @user.email end end describe "find a use...
2011 Feb 13
0
Login user UserSession.create for rspec not working
I''ve got a show action for a map object which should return 200 if the current_user is the maps owner I have defined a method on my user object "current?" which returns true or false if that user is the same as the current user I have model spec set up for that which mocks UserSession.find.user and that works fine But for the controller test I want it to be closer to a
2011 Jun 29
6
RSpec with Rails 3.1rc4: spec test won't recognize <%= %> (should be simple)
In my user_sessions_controller: class UserSessionsController < ApplicationController before_filter :require_no_user, :only => [:create, :new] before_filter :require_user, :only => :destroy def new @user_session = UserSession.new @message = "Hello." end def create @user_session = UserSession.new(params[...
2010 Jan 26
1
Why does UserSession.find return nil when using user_credentials = single_access_token?
I believe that I''ve set up everything such that single_access_token should be sufficient to pull a user''s session. The scenario is: Bob uses Firefox and creates an account on LoginUI (http:// www.coolaj86.info/loginui). Instead of using cookies, Bob''s single_access_token comes in the response to the request. LoginUI submits Bob''s single_access_token with every
2010 Jul 28
1
paperclip, authlogic and callback issue
I use authlogic for authentication and paperclip for handling user''s profile picture attachments. I use the following method to get the current_user def current_user_session return @current_user_session if defined? (@current_user_session) @current_user_session = UserSession.find end def current_user return @current_user if defined?(@current_user)
2010 Nov 14
5
Authlogic and rails 3 : NameError in User sessionsController#new
...p:// railscasts.com/episodes/160-authlogic), and the resources I was able to find on the web, but I''m facing a problem. Once I''ve generated the user_sessions controller and mapped the login and logout routes, I get an error if I try to load the login page : uninitialized constant UserSessionsController::UserSession app/controllers/user_sessions_controller.rb:11:in `new'' The user_sessions model is really simple : class UserSession < Authlogic::Session::Base end But it looks like this class declaration is not considered by Rails... Does anyone have an idea ? Thx by advance...
2010 May 21
0
Authlogic and Single table inheritance
Hi, I have some models such as: class User < ActiveRecord::Base acts_as_authentic end class Admin < User end class Superadmin < Admin end And some controllers such as: class UserSessionsController < ApplicationController def new @user_session = UserSession.new end def create @user_session = UserSession.new(params[:user_session]) if @user_session.save flash[:notice] = t(''user_sessions.flash.create.notice'')...
2010 Jun 10
0
uninitialized constant UserSessionsController::UserSession
This is the error I got. I am working with authlogic and was able to register the user. But when I create user_sessions and try to login, I got his error. Guys can u help me out in this. Thnak you, Siva -- 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
2010 Jul 19
6
Setting a root_url
I know how to setup a roo_url using map.root in "routes.rb". The issue I''m currently having is as follows: I walking through this Rails cast regarding Authlogic: http://railscasts.com/episodes/160-authlogic I decided that I make my map.root the "login" page, that is, the index.html.erb of the user_sessions_controller. So, what I did is typed the following in the
2011 Jun 09
8
Fail to call
...icationController def hi @current_user if (@current_user) @welr = ''¡Bienvenido'' + @current_user + '' a nuestra web!'' else @weli = "¡Bienvenido invitado, no dude en registrarse!" end end end #user_sessions_controller class UserSessionsController < ApplicationController def new @user_session = UserSession.new end def create @user_session = UserSession.new(params[:user_session]) if @user_session.save flash[:notice] = "Estás dentro de nuestro sistema" redirect_to root_url else ren...
2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
...<%= link_to "Login", login_path %> and I get the following error message: undefined local variable or method `login_path'' for #<#<Class:0x0000000311e8f8>:0x0000000310af38> To overcome this, ive just used a string. i.e. <%= link_to "Login", "/UserSessions/new" %> Now it seems like i''ve reached an impasse. When i try to output the current user with: <%= @user.Login %> I get an error that im unable to circumvent. Can you please help me? Thanks :) Please find below the error message, and some of the code. undefined method `Lo...
2011 Jun 01
7
desperate, errors with file upload
hello, i implementing a file upload using paperclip plugin. i getting the following error [1] when uploading a file. I''m using the gems rails v2.3.8 and paperclip v2.1.6. the parameter hash looks like [2], the model like [3]. Interesting is that i get two different errors, on the localhost with webrick it says: Status: 500 Internal Server Error no marshal_dump is defined for class
2012 Apr 09
8
Rails Functional Testing Problem
I''m trying to run some functional tests on Rails. However I am coming up with the following error. RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id app/controllers/posts_controller.rb:11:in `create'' posts_controller_test.rb:5:in `test_should_create'' Here is my test file require
2009 Oct 28
1
Authlogic Page View Authentication Help
Hi: I am a newbie at ROR, and I am grasping my head around Authlogic. I am having hard time trying to figure out how can I do the following: in my application controller I have the following helpers: filter_parameter_logging :password, :password confirmattion helper_method :all private def current_user_session return @current_user_session if defined? (@current_user_session)
2010 Nov 07
1
Strange authlogic logout behavior
I am using authlogic for my application''s authentication. If I decide to login with an account and then immediately logout, I get an error. Unknown action The action ''show'' could not be found for UserSessionsController The server log in development says: Started GET "/user_session" for 127.0.0.1 at Sun Nov 07 13:28:31 -0800 2010 AbstractController::ActionNotFound (The action ''show'' could not be found for UserSessionsController): Rendered /usr/lib/ruby/gems/1.8/gems/actio...
2009 Oct 18
4
NoMethodError in User sessionsController#new
...arching but with no success. I tried setting the current_user method in Application_controller to protected and not private, on the recommendation in Stack Overflow. Error in browser----------------- NoMethodError in User sessionsController#new undefined method `require_no_user'' for #<UserSessionsController: 0x24fc700> Error in terminal------------------ Processing UserSessionsController#new (for 127.0.0.1 at 2009-10-17 23:26:38) [GET] Parameters: {"action"=>"new", "controller"=>"user_sessions"} NoMethodError (undefined method `require_no...
2009 Aug 02
13
NoMethodError in User sessionsController#create - Authlogic
...fter registration new user is automatically logged in, he can edit his profile, but after clicking logout and trying to login again I get error NoMethodError in User sessionsController#create undefined method `mb_chars'' for "rzepak":String My user_session_controller.rb: class UserSessionsController < ApplicationController def new @user_session = UserSession.new end def create @user_session = UserSession.new(params[:user_session]) if @user_session.save flash[:notice] = "Successfully logged in." redirect_to root_url else render :action => ...
2010 Dec 02
7
Rails 3 + Authlogic not working all of a sudden
Hey People, I''ve been working on Rails 3.0.0 and Authlogic for quite a while now but all of a sudden I can''t login into my application anymore. After some research I found out that no sessions are stored into the db anymore so I started the console and saw this: ruby-1.9.2-p0 > u = UserSession.new({:username => ''Test'', :password =>
2010 Sep 09
1
NoMethodError in User sessionsController#create
Having a frustrating go at authenticating a user, pretty sure it must have something to do with gem version conflicts, but I can''t seem to find a solution that works. No matter what username & password that is entered into the login form I get the same error screen: NoMethodError in User sessionsController#create undefined method `protected_password'' for #<UserSession:
2008 Dec 16
20
step definitons to check login
I am working with the authlogic gem and trying to create 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] =