Displaying 20 results from an estimated 2000 matches similar to: "Dynamically setting the session domain?"
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''
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
2006 Aug 03
0
Sharing sessions across subdomains
Has anyone else experienced this strange behavoir with sharing
sessions across subdomains?
I have in development.rb
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_domain
=> ''.localhost.com'')
If I create a session at foo.localhost.com then go bar.localhost.com a
session is created (with host localhost.com) and everything works
fine.
But if I then go
2006 Jan 17
10
ActiveRecord + memcache = cached_model
Courtesy of The Robot Co-op.
$ yes | sudo gem install cached_model
Or, you can download cached_model and memcache-client (our zippy-fast
memcache library, required) from:
http://rubyforge.org/frs/?group_id=1266
I don''t have the README posted for making cached_model work online
yet, so here it is:
= CachedModel
Rubyforge Project:
http://rubyforge.org/projects/rctools/
== About
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
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
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
2008 Feb 09
1
how to check the config.action_controller.session options ?
when setting it in my environment.rb
config.action_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
=>
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"
2006 Mar 03
1
number_to_currency() helper == non DRY == could be improved
Hi all,
Apologies in advance if I got this one wrong, I''m still just a
newbie ;-)
Going through the Apple ADC RoR tutorial it suddenly occurred to me
that the ''number_to_currency()'' helper method was not DRY streamlined.
Scenario::
The "number_to_currency()" methods options hash works great when I
need to dynamically display different currencies when I
2006 Jan 30
0
cached_model-1.0.1 ActiveRecords + memcache
The new version of cached_model features bug fixes and tests!
Bugs fixed:
Updating a model no longer stores associations into the cache. This
could cause strange, hard-to-debug bugs when an invalid set of
assocations was retrieved along with a cached model.
Reloading a model refreshes the cache.
When CachedModel::find can''t understand query params and a single
result is
2005 Dec 25
1
How to use mem_cache_store?
Hi,
I''m trying to use mem_cache_store for sessions. I have installed the
server and the gem and have added the following to my
config/environment.rb:
>>>>>>>>>>>>>>>>>>>>>>>>>
memcache_options = {
:c_threshold => 10_000,
:compression => true,
:debug => false,
:namespace =>
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 May 24
2
OSX Rails Session Issues
Hey friends,
I need a little assistance getting one of my applications running on
OSX.
I am able to install everything, and get my application running, but
when I try to store an object in the session in one of my apps, the
session object doesn''t get stored.
I tried running webrick, and I tried running under lighttpd.
I tried running a regular session store, and a mysql
2006 Mar 09
4
cross domain cookies
Does anybody know how to access the domain of a cookie from inside rails?
I am try to integrate phpbb forums into my site and one of the things phpbb
does is store a cookie. The forums are at forums.domain.com and the site is
www.domain.com so i needed to set the cookie domain in phpbb to just be
".domain.com" so both sites can access it. The trouble is when using
cookies[] in rails,
2006 Feb 12
3
memcache-client/cached_model help
Hi -
Just downloaded and installed the memcache-client and cached_model
gems and am trying to test it out on a development setup. I added
this to my environment/development.rb
CACHE = MemCache.new :c_threshold => 10_000,
:compression => true,
:debug => true,
:namespace => ''eztrip'',
2005 Dec 13
3
Forcing the session-id
We''re going to have problems keeping cookies across domains. We want
people to shop in one domain (e.g. "booksareus.com") and then checkout
on the same server securely under a different domain (e.g.
"greatbooks.com"). When we make the jump to the secure domain (the
checkout link) can we submit the user''s session ID along with it and
have it
2006 Aug 07
16
Monthly billing and payment processor recommendations?
Hi,
I''m setting up a site that will bill on a monthly basis. I would
rather not have to worry about storing customer credit card
information. Does anyone have recommendations on payment processors
that offer monthly billing services?
I don''t want to go the paypal route as I want the user to stay on
the site. I''m hoping to find an API to integrate with. I have
2007 Jan 23
2
SslRequirements plugin and mocha
Hi. I''m loving mocha but have ran into a problem with using the mocha
plugin with a project that has the SslRequirement plugin. It seems
there is some conflict between the two? Any ideas?
$ ruby test/functional/calendar_controller_test.rb
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:478:in
`const_missing'': uninitialized constant