Session bug using facebook-connect-with-authlogic in Rails
Posted
by Jesse
on Stack Overflow
See other posts from Stack Overflow
or by Jesse
Published on 2010-03-12T12:36:35Z
Indexed on
2010/03/13
5:15 UTC
Read the original article
Hit count: 624
I'm trying to follow this article: http://ryanbigg.com/2010/03/testing-facebook, but I'm stuck. I think the problem is with my session, in that the current_user
method comes up with nil for session[:facebook_session]
.
According to the original authlogic, it says to use the active_record_store for sessions:
# config/environment.rb
config.action_controller.session_store = :active_record_store
# db/schema includes
create_table "sessions", :force => true do |t|
t.string "session_id", :null => false
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
end
The article calls for the use of cookies. I'm confused; can I use cookies and the active record sessions? I'm also confused by the use of cattr_accessor :current_user
from within the User model -- current_user
still goes in the application controller, right?
Please help.
© Stack Overflow or respective owner