Displaying 20 results from an estimated 33 matches for "default_session_options".
2006 Feb 08
10
Sharing sessions between subdomains?
Hello,
I know how to share sessions between subdomains in PHP. Can anyone please guide me as to how I can share sessions using Ruby? Where can I set the value of domain for which the cookie is set?
I would like for a user to login on the home page and then go to blog.home.com and not have to login again.
Any guidance/pointers are appreciated.
Thanks''
2006 May 17
3
Session in ActiveRecordStore
The Agile book seems to say I should specify this as follows, probably in the
environments.rb:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager] =
CGI::Session::ActiveRecordStore
BUT the environments.rb file would have me Un-Comment this:
config.action_controller.session_store = :active_record_store
Anyway, I''ve tried both, and in both cases it generates new sessions all too quickly, so
that no page see...
2006 Jul 11
1
Dynamically setting the session domain?
...) that takes a subdomain, username,
password, authenticates, then redirects to
http://#{subdomain}.mysite.com.
I need to set the session_domain option (to the subdomain) dynamically
so the cookie can be read when the user arrives after the redirect. I
know I could do
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(
:session_domain => ''example.com'') if I wanted to share sessions across
domains, but I do not want to do this as I want to allow users to be
logged on to multiple subdomains at the same time.
Any ideas?
Thanks,
Zack
2006 Feb 09
1
session cookie expiration
from the Agile Book, i see i can set the absolute session expiry time via:
ActionController::CGIRequest::DEFAULT_SESSION_OPTIONS[:session_expires]
however, I don''t see anything about what the actual default setting is when
a session is created.
also, is there a way to set the expiration to happen when the browser is
closed?
in PHP, this can be accomplished using
session.cookie_lifetime 0 in php.ini
can this be...
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 Feb 09
1
how to check the config.action_controller.session options ?
...controller.session = {
:session_key => ''_myapp_session'',
:secret => ''3a64394bb895f1f05e0c07f71127d93d''
}
I cannot get it back in the script/console ..
:session_key=>"_session_id" !!!
why ?
>> ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS
=> {:session_key=>"_session_id", :cookie_only=>true, :session_path=>"/",
:prefix=>"ruby_sess.", :database_manager=>CGI::Session::CookieStore,
:tmpdir=>"/Users/myself/tmp/sessions/"}
how can get back the :session_key and :secret in my co...
2005 Aug 06
2
Problem with 0.13.1 ActiveRecordStore with PG 8.0.3.
Hi,
I put the following in my environment.rb file:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
(:database_manager => CGI::Session::ActiveRecordStore)
Runnning WEBrick via "script/server" and trying to load any page
served by a controller results in an error like the following:
#<ActiveRecord::StatementInvalid: ERROR: null value in column "id"
violates...
2006 Mar 03
1
number_to_currency() helper == non DRY == could be improved
...'s still not exactly DRY nor elegant
is it ?
Instead I would propose as similar scheme to the ''session_key''
override functionality that I use a lot.
## add a custom session ID for this site (when developing with many
apps on local system)
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] =
''00_shows_at_top_of_sorted_cookies_list''
Whereby we could define the DEFAULT_CURRENCY_TYPE in the
environment.rb or something similar.
However, an app could also need to be localized, ie I might want the
default currency to be ? and someone else might want...
2006 Apr 20
12
memcache, sessions, fragments, oh my!
Hi all -
I am trying to get rails to use memcache for sessions and fragment
caching. I''d also like to use the same connection for general caching of
this and that.
I''m following the instructions here:
http://wiki.rubyonrails.com/rails/pages/HowtoChangeSessionStore
and hitting a brick wall.
I''m using the new memcache-client since from what I''ve read
2006 Mar 07
2
memcached and Joe Hosteny''s Salted Hash Login Generator
Hey,
so - I''ve been fiddling about and fell in to use Joe''s simple-yet-
painful SHLG (I shouldn''t complain... not at least I have time to
produce one :)). I just recently plugged in memcache, and- it''s not
preserving my login.
I traced the execution and it sets the output of User.authenticate (a
user AR object) into @session[''user'']
2006 Jul 03
3
Sharing Session Between Two Applications
Hi
We have a rails application deployed and working fine. Along with this, we are planning to add "Opinion" forum. The url of the forum will be like http://forum.mymainsite.com Is it possible to share the session (that is, if the user is already logged in on the main site, he need not log in again on the forum section).
Is it possible to add the ''opinion'' as a
2008 Jun 19
5
How do you create one session cookie for multiple subdomains
I am using the restful authentication plugin and am always prompted to
login if a different subdomain is accessed. I have found a couple rails
"solutions", but none of them seem to work:
# development.rb
1. ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key]
= ".localhost"
2. ActionController::Base.session_options[:key] = ".localhost"
Does anyone have a way that works?
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are su...
2006 Jan 17
10
ActiveRecord + memcache = cached_model
...emCache.new memcache_options
CACHE.servers = ''localhost:11211''
session_options = {
:database_manager => CGI::Session::MemCacheStore,
:cache => CACHE,
:session_domain => ''trackmap.robotcoop.com''
}
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
session_options
You will need separate namespaces for production and development, if
using
memcache on the same machine.
Note that using memcache with tests will cause test failures, so set
your
memcache to be readonly for the test environment.
Then make Rails load the gem:
$ ta...
2006 Apr 12
1
Dealing with documentation : how to find REAL doc ?
...ferent
platforms, I definitively find the documentation not enough precise. But
those are my thoughts and I hope somebody can point my out to the good
way to find something.
For example, I currently look for information about session managment,
and find the code :
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update (:prefix =>
"something")
Wow ! What''s this ? I take the rails doc and could not find CgiRequest,
neither DEFAULT_xxx. Following it''s in the ActionController, I find this
module is in the actionpack (by search it manually in the files of the
Rails doc). The...
2006 Mar 07
0
Storing sessions files elsewhere on EdgeRails
Hi all,
In a Rails 1.0 project, I successfully changed the sessions storage
location to <RAILS-ROOT>/tmp, by adding
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:tmpdir =>
File.join(RAILS_ROOT, ''/tmp''))
in environment.rb
Problem:
--------
I tried to use the same trick in an EdgeRails project, but it doesn''t
work : server error, with no msg in the logs.
(MacOS X, with Locomotive.)
When I start the console, I get a ne...
2006 Feb 01
1
Unwanted sessions after routing error
...then the session file is created.
I see this behavior in both the development (WEBrick) and production
(Apache) environments.
After reading
<http://wiki.rubyonrails.org/rails/pages/HowtoChangeSessionOptions>, I
tried this as a workaround in environment.rb:
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:disabled
=> true)
That didn''t help.
It appears that this problem occurs after the render_* methods, while
ActionController is building the response, so I''m not sure how to
workaround it.
FYI, I found this problem because of a bad image URL that someone had
entere...
2006 Feb 06
0
how can I retrieve a session based on the session-id
...ried to hackaround with reading the _session_id form
the cookie and sending it together with the fileupload POST from the
flashplayer to the webserver.
But how can i retrieve the session based on the session_id at my controller
?
I tried to add this to my action:
::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_id
=> params[:session_id])
and I hoped that the session for the request gets created based on
params[:session_id], but this is not the case.
So how do I retrieve from within an action a session from the
session-storage based on a sesison_id ?
--
Roberto Saccon - http://rsaccon...
2006 Feb 12
0
problem serving files which start with newlines
...r and that when using e.g. apache this
will go away?
def handle_dispatch(req, res, origin = nil) #:nodoc:
data = StringIO.new
Dispatcher.dispatch(
CGI.new("query", create_env_table(req, origin),
StringIO.new(req.body || "")),
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS,
data
)
print data.string <- linefeeds still there
header, body = extract_header_and_body(data)
print body <- linefeeds gone
[...]
end
[...]
def extract_header_and_body(data)
data.rewind
data = data.read
raw_header, body = *data.split(/^[\x...
2006 Jan 30
0
cached_model-1.0.1 ActiveRecords + memcache
...emCache.new memcache_options
CACHE.servers = ''localhost:11211''
session_options = {
:database_manager => CGI::Session::MemCacheStore,
:cache => CACHE,
:session_domain => ''trackmap.robotcoop.com''
}
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
session_options
You will need separate namespaces for production and development, if
using
memcache on the same machine.
Note that using memcache with tests will cause test failures, so set
your
memcache to be readonly for the test environment.
Then make Rails load the gem:
$ ta...
2005 Dec 25
1
How to use mem_cache_store?
...e => false
}
CACHE = MemCache.new memcache_options
CACHE.servers = ''localhost:11211''
session_options = {
:database_manager => CGI::Session::MemCacheStore,
:cache => CACHE,
:session_domain => ''ruby-forum.com''
}
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update
session_options
<<<<<<<<<<<<<<<<<<<<<<<<<
Bur Rails still uses the session table in the database. Is there
anything else I have to do to in order to make this work?
Thanks
Andreas
--
Posted via http://www.ruby-f...