similar to: Problem testing Authlogic UserSession

Displaying 20 results from an estimated 200 matches similar to: "Problem testing Authlogic UserSession"

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
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 =
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
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[:user_session]) if @user_session.save
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
2011 Jun 09
8
Fail to call
Hi, I''m trying create a user system for a future project but I have a problem when I want give to my users the "Welcome". This is my code: #application_controller class ApplicationController < ActionController::Base protect_from_forgery helper_method :current_user private def current_user_session return @current_user_session if defined?(@current_user_session)
2009 Aug 02
13
NoMethodError in User sessionsController#create - Authlogic
Hi, I''m beginner in rails, and I wanted to add to my simple application Authlogic. So I''ve watched http://railscasts.com/episodes/160-authlogic and step-by-step done everything. And almost everything works fine, except login in. After registration new user is automatically logged in, he can edit his profile, but after clicking logout and trying to login again I get error
2010 Nov 22
3
Issue using bundler
I run bundle install, or bundle update, and it fails. I''m using RVM, so if I switch to Ruby 1.9.2, this works fine, but using Ruby 1.8.7 it fails. Any idea? jeremy-woertinks-imac:winovations jeremywoertink$ bundle update Fetching source index for http://rubygems.org/ Using rake (0.8.7) Using RedCloth (4.2.3) Using abstract (1.0.0) Installing activesupport (3.0.1)
2010 Nov 30
0
simple SQLITE3 error!!??library routine called out of sequence
Hi, dear guys! I have following super simple program dbh=DBI.connect("DBI:SQLite3:barron.db") sth=dbh.prepare("INSERT INTO WORDS VALUES(?,?,?)") 3.times{ sth.execute("1","2","3") } and it gives me error : /Users/tsdeng/.rvm/gems/ruby-1.8.7-p302/gems/sqlite3-ruby-1.3.1/lib/sqlite3/statement.rb:41:in `bind_param'': library routine called
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 Nov 14
5
Authlogic and rails 3 : NameError in User sessionsController#new
Hi everybody, I''ve installed Authlogic on Rails 3 following the Railscast (http:// 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
2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
Im new to Rails, and decided to start of with Rails3. After a lot of searching ive managed to get a little bit of Authlogic working. I''m able to register a user, login & logout. Now, I would like to add more features, get more of authlogic working. I''m using Railscast EP 160 as my reference. Portions of the code found on the tutorial throw errors: Eg: <!--
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
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)
2012 Jun 14
0
Query about TSRV
Hi All, This question may not belong here, but I asked this on the R-SIG-FINANCE list and so far have not got any reply, so was hoping someone here may help. I have a basic query about TSRV and was hoping you all can shed some light on the issue. I have 22500 records for each day. So if I take the slow frequency as 5 mins I can have 75 subgrids. An estimate of the 5-minute realized volatility
2010 Nov 30
2
Help with yum and cpio: MD5 sum mismatch
I am trying to install Ruby-1.8.7p302 on a CentOS-5.5 server in preparation for a Rails-3 application deployment. I have downloaded the source from Rubyforge.org, unpacked it, and ran ./config and make. Everything built without error. I then ran checkinstall to create an rpm package. That too completed without error. However, when I try to install the resulting package using: yum localinstall
2012 Feb 06
3
Bundler - how to re-install all gems after os update?
I had a working Rails setup using RVM on Ubuntu 11.10 with /home on a separate partition. I installed Ubuntu 12.04 (Alpha) on the root partition, leaving the home partition unchanged. I now find that some things don''t work, I think due to the fact that the system has been updated and versions of libraries have changed. For example I get: $ rails c
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 =>
2008 Nov 19
1
mle2 simple question - sigma?
I'm trying to get started with maximum likelihood estimation with a simple regression equivalent out of Bolker (Ecological Models and Data in R, p302). With this code: #Basic example regression library(bbmle) RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5)) names(RegData)<-c("x", "y") linregfun = function(a,b,sigma) { Y.pred = a+b*x
2010 Dec 22
5
rvm, rails and sqlite
i need to use old version of ruby (1.8.7) and older version of rails (2.1.0) so i decided to use rvm. however since i''m somewhat new to ruby and rails i''m having issues. i created a gemset with rvm for my project, installed rails 2.1.0 into it. after that i created a project and a scaffolding for it. however i bumped onto an issue with sqlite3 (or sqlite3-ruby). it seems to me