similar to: Overwriting catch all routes

Displaying 20 results from an estimated 8000 matches similar to: "Overwriting catch all routes"

2006 Jun 13
0
Mixing dynamic and static content in routing
Hi all, I am working on a small project--a backend for a website with a tree like structure. I have a Node model which acts_as_tree and use polymorphic associations to "link" differend resources (a free form page, a course description and so on) to the nodes. In my routes.conf I have map.connect ''/homepage/*path_info'', :controller => "index",
2006 Jan 24
17
Updated lighttpd to 1.4.9 - error running dispatch.fcgi
Hi all, I just updated lighttpd from 1.4.8 to 1.4.9 and it now refuses to start with the following error: 2006-01-24 23:12:24: (mod_fastcgi.c.989) execve failed for: public/ dispatch.fcgi No such file or directory 2006-01-24 23:12:24: (mod_fastcgi.c.1015) the fastcgi-backend public/ dispatch.fcgi failed to start: 2006-01-24 23:12:24: (mod_fastcgi.c.1019) child exited with status 2
2006 Feb 01
4
Custom view helpers
Hi all, I would like to write some custom helpers like the ones available as form helpers text_field, text_area and the like. My first try was this: custom_helper(obj, meth) ''some_string'' + obj.send(meth) + ''some_other_string'' end Object and method are being passed as symbols like this: custom_helper(:person, :name) and Ruby rightfully complains that
2005 Mar 06
12
Where to place custom classes?
Hi all, I am writing a simple shopping cart which will consist of a single class. There will be no DB table for carts so I do not want to make my Cart a model. But where do I place my Cart class so that I can access it in my controllers? I want to be able do do things like this (for instance in a shop controller): def add_to_cart @session[''cart''].add(article_id, amount)
2005 Mar 06
4
has_many and order
Hi all, if I have a has_many and belongs_to relations like this category has many articles article belongs to category is there a way I can specify the order of articles when pulling them up with @some_category.articles ? Many thanks in advance! -- Nicky
2006 Mar 08
2
Multilingual Validation Messages
Hi all, I have a mutilingual app and want to customize the validation error messasges. I cannot override them as I need them in more than one language, so I have done the following: validates_presence_of :some_attr, :message => _(''should not be blank'') I am using gettext to translate the message. This works in development mode, but not in production, even after a
2006 Jun 17
2
URL based on acts_as_tree using routes
Hi There! I''d like some feedback before I try to implement some funky rails routes based on an acts_as_tree model. I have a Page model that acts_as_tree. I''d like the URLs to look something like this: http://localhost/about-us/staff/jeff or, another example... http://localhost/what-we-do/products/our-great-cms/features/faqs/ So, as many sub-nodes the user creates,
2006 May 08
2
Associating with different classes
Dear Railers, I am toying with a new project and have a schema design question. I have a tree-like node structure. Each of the nodes will be associated with a single object. This associated object can be of a variety of types. I represent the tree through a Node class which acts_as_tree. Now imagine three other classes--Animals, Fruits and Vegetables. Each node will have an association
2006 Jul 28
0
URL root/serving more than one app per subdomain
Hey folks, I have the following situation: I have a secure server, and I''d like to run multiple Rails apps without dealing with setting up multiple secure servers, with their fixed IPs, etc. So, I want to do https:// secure.domain.com/app1/ and https://secure.domain.com/app2/ etc. In lighttpd this is possible using a combination of relative_url_root in each app (in
2006 Jan 11
2
Handling ''recognition failed''?
How can I handle ''recognition failed'' errors so they act like typical 404 errors? By displaying a message, page and/or redirecting. thanks csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2006 May 17
0
Strang Behavior when testing Routes
I have the following route: [code] map.connect '':platform_filter/:software/:version/:platform/:distribution_channel/:id'', :controller => ''user/version'', :platform_filter => /all/, :platform => /windows|macintosh|unix|linux/, :distribution_channel => /Download|download/, :action => ''download'', :id =>
2006 Jul 25
4
about PATH_INFO and FastCGI
in one of my recent email, I add .to_s to PATH_INFO in camping code. actually, this is probably very wrong. the problem is probably something like PATH_INFO does not exist when using FastCGI. I have not done all my homework, but so far what I found is lighttpd has a special option "broken-scriptfilename": breaks SCRIPT_FILENAME in a wat that PHP can extract PATH_INFO from it (default:
2006 Mar 11
0
Ruby-GetText-Package-1.3.0
Hi, Ruby-GetText-Package-1.3.0 is now available. Now ActiveRecord::Column.human_name values translate automaticaly. Changes for RoR --------------- * Improve Local::Object * POSIX, C convert to "en". * Enhance supports of Ruby on Rails. * ActionMailer localization support. * Use GetText function(_() N_() etc) in template. * ISO-2022-JP charset is used when language
2006 Nov 13
6
mongrel_upload_progress question/possible suggestion
Hey all, First off, thanks to Rick Olson and whoever else was involved with this plugin... It''s been amazingly easy to implement. I''ve got a question about the path_info parameter, though... It seems that unless the request PATH_INFO exactly matches the path_info passed in to the plugin at inclusion, it won''t actually trigger Add and add the upload to the list of
2007 Feb 23
0
Mongrel::Uploads.check() not returning status
Hi, I wrote a message earlier regarding how I wasn''t getting any feedback from mongrel_upload_progress. After putting lots of debug messages in the plugin, I figured out what was going on. I had a route like this setup in routes.rb (this was the problem): map.upload "upload/:upload_id", :controller => "file", :action
2006 Sep 20
0
boy, that mongrel_upload_progress handler sucks!
I started actually using the upload progress handler, and noticed it was leaking memory over time. Looking at the code, I noticed that cancelled uploads weren''t being cleaned up. I bugged Zed about adding a request_abort callback to handlers, but I found a simple way to monkey patch that in: # config/mongrel_upload_progress.conf # yes, this file is being used with -S meaning
2007 Oct 19
0
X-Sendfile, static files, windows
Jeremy, I found your old message with this title. I struck the same thing, where the current drive wasn''t the same as the drive I wanted to serve (some) files from. So here''s the patch to add to lib/mongrel/handlers.rb contains class DirHandler. I added two things, first to initialize: def initialize(path, listing_allowed=true, index_html="index.html")
2007 Aug 10
1
serving static files
It seems that Merb is sending static files with Mongrel::DirHandler. (mongrel_handler.rb:52) if get_or_head and @files.can_serve(path_info) # File exists as-is so serve it up MERB_LOGGER.info("Serving static file: #{path_info}") @files.process(request,response) I haven''t done benchmarks and I''ve hardly glanced at DirHandler''s code but the
2006 Jun 29
1
newbie routes q
It looks like my lighttpd server crashed yesterday. The only thing I found of interest is that the last request in my production log was from somebody looking for a URL that doesn''t exist in my app. I should probably fix it with routes, right? Can somebody help me understand how to route all 404 errors back to the index page? Also, where should I put a rescue for
2013 May 31
0
DH group selection for SHA2-512 bit HMAC.
Hi. I've got the following problem with our SSH client library: - client connects to OpenSSH 5.9+ server and they choose hmac-sha2-512 with diffie-hellman-group-exchange-sha256. - client sends MSG_KEX_DH_GEX_REQUEST DH group request with parameters (1024, 1024, 8192). I.e. minimum and preferred group size is 1024-bit, - OpenSSH server in kexgexs.c:kexgex_server processes this message and