similar to: Dealing with documentation : how to find REAL doc ?

Displaying 20 results from an estimated 2000 matches similar to: "Dealing with documentation : how to find REAL doc ?"

2006 Jul 11
1
Dynamically setting the session domain?
Does anyone know a way to dynamically change the session_domain option of ActionController::CgiRequest? I want to have a login section on an index page (www.example.com) 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
2006 Jun 14
6
find and LIKE ''xxx%'' clause
Hi there ! I try to figure out how to do something like this in Rails : SELECT * FROM my_table WHERE name LIKE ''GOGONAM%'' My problem is the % and the quotes. >From now, I do like this : searched_name = params[:name]+''%'' user = MyTable.find(:all, :conditions => ["name LIKE ?", searched_name]) But is there a more gracefull way to do a LIKE
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 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 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 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
2006 Feb 01
1
Unwanted sessions after routing error
I''m building a session-less application and have set "session :off" in the base controller (ApplicationController in application.rb). Unfortunately, I still see session files appearing in /tmp/ruby_sess.* -- and the cause of these files is when a routing error occurs. Whenever a bad URL comes in, for example <http://localhost:3000/not/a/chance/in/hell>, the
2006 Feb 06
0
how can I retrieve a session based on the session-id
I am trying to mix Flash and RoR (for fileupload without pagerefresh) Unfortunately the requests originating from the flashplayer do not have the right sessionid. So I tried 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
2006 Feb 12
0
problem serving files which start with newlines
I''m working on a rails app that stores files in a database and allows users do download them again. But when a file starts with newlines they get lost in the process and the browser marks the download as failed because the received filesize is smaller then the expected filesize (the difference is exactly the newlines missing). To reproduce this place something like this an a
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 =>
2008 Jul 15
1
sex expire time for Sessions in memcached
Hi all, I have a problem with expiring sessions in the case with using mem_cache_store. I''ve been using ActiveRecord session store till now and expired them with SQL query. Yesterday I switched to memcache for storing sessions, however I can''t set an expireation period. My current config is this: ======================== memcache_options = { :c_threshold => 10_000,
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 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'',
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
2007 Nov 06
1
[PATCH] ActionController::CgiRequest#host_with_port() should handle standard port
Hi everyone, I''m looking for some +1''s for a bug fix patch I submitted: http://dev.rubyonrails.org/ticket/10082 The problem is that CgiRequest#host_with_port() overrides AbstractRequest#host_with_port() and does''nt use port_string() with standard_port() care. So I created patch to rename CgiRequest#host_with_port() to host_with_port_without_standard_port_handling().
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''