Displaying 20 results from an estimated 300 matches similar to: "Authlogic and Single table inheritance"
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
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:
<!--
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 15
0
Problem testing Authlogic UserSession
I''ve posted this to the Authlogic group but things seem a little quiet, so
perhaps someone here can help:
''m testing Authlogic 2.1.6, running under Rails 3.0.1., using rspec
2.1.0
I have the following:
user.rb
class User < ActiveRecord::Base
acts_as_authentic do |config|
config.login_field :email
config.ignore_blank_passwords false
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 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)
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)
2009 Oct 18
4
NoMethodError in User sessionsController#new
I''m setting up authentication with Authlogic and I get this error.
I''ve done some searching 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
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"},
2009 Dec 03
2
AuthLogic Question - one time password (persistence_token) - what config is required to use this???
Hi,
I''m stuck trying to work this one out - have been reviewing the
AuthLogic code base but having a hard time making sense of it (
http://github.com/binarylogic/authlogic ).
Question 1 - Can anyone confirm what config exactly is required to
make the one time password (persistence_token) work in AuthLogic? See
below for the bulk...
Question 2 - If not the full answer to the above,
2010 Feb 16
0
Strange routing(?) Issue
I have a Model event and the following two lines in routes.rb
1 - map.connect "events/:action", :controller => ''events'', :action => /
[a-z_]+/i
2 - map.resources :events, :has_many => :comments, :has_one
=> :address #, :collection => {:mapit => :get}
I have #1 so that I can call custom actions from a link_to_remote link
from my index page t0 update a
2010 May 04
2
Session Store Issues on Production Server
Hello,
I am using AuthLogic as my authentication gem. Everything is great on
my development server. When I upload to my passenger driven
production server at Dreamhost, the sessions are persisting
relentlessly. In other words, a user cannot log out. I have tried
implementing the Active Record session store and have changed
the :secret key in initializers/session_store.rb, but for some reason,
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 Oct 30
3
Authlogic not active
Trying to add authlogic in a simple project but get the error;
Showing app/views/layouts/application.html.erb where line #33 raised:
undefined method `underscore'' for nil:NilClass
Extracted source (around line #33):
30: <div id="mainleft">
31: <ul class="menu">
32: <li><%= nav_link "Home", "site", "index"
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
2011 Jun 30
2
Testing RSpec views: the index action; is my methodology flawed?
This is my organizations_controller_spec.rb:
require ''spec_helper''
describe Superadmin::OrganizationsController do
describe "GET index" do
it "shows a list of all organizations" do
#pending "don''t know why this doesn''t work"
Organization.should_receive(:all)
end
end
end
============
This is my
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