Displaying 20 results from an estimated 10000 matches similar to: "Custom path overriding - routes.rb"
2006 Mar 04
0
Reading from Session in routes.rb?
Hi all,
I''m developing some custom routes for an application and am creating the
aliased url_for commands that I like so much. However, one of the things I''d
like to do is read a string from the session (or possibly even pull out an
object to get to the string) and use that in the URL generating by the route
-- without having to pass the string into the url_for alias every time.
2010 Jul 27
0
Using an ActiveRecord model in routes.rb
Is it potentially dangerous to use an ActiveRecord model in routes.rb?
Here''s a line from our routes.rb file:
> map.resources :registrations, :requirements => { :id => User::USERNAME_REGEXP }
Registration#to_param returns the User''s username.
User::USERNAME_REGEXP is just a regex that matches one or more valid
username characters.
This route works as expected, but my
2012 Feb 01
0
Rails 3.1 form & routes.rb [newbie]
Hi all,
maybe is a newbie question anyway
1. I create de rails app with
# rails new {my app}
2. after I add some gem to my Gemfile
source ''http://rubygems.org''
gem ''rails'', ''3.1.1''
gem ''sqlite3''
gem ''simple_form''
gem ''execjs''
gem ''therubyracer''
# Gems used only
2007 Apr 30
0
Cache routes.rb in development?
My routes.rb files uses resources and building the routes for each
request takes a while. Is it possible to cache the routes during
development, like they do in production, but without caching everything
else?
Thanks for your help.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
2006 Jul 14
0
Newbie: Application Error (Rails) no such file to load -- ../config/../config/routes.rb
Hello,
I am getting an ''application error (rails)'' error
whenever I try to access my application from
index.html.
The application WAS working fine.
If I look into development.log, I see the msg:
no such file to load -- ../config/../config/routes.rb
BUT the files does exist in the expected directory.
I did have some problems with Suse (GRUB loader) in
between last accessing
2006 Jun 30
1
using routes.rb from inside a controller / render_component_as_string / generally stumped
Hi,
In an action I have a string representing a url for a get request. A
simple and seemingly ridiculous example might be something like the
following. What I''m trying to do is much more complicated but I think
this tiny example shows where I am stuck.
Into their browser a user types
"http://my.domain.com/admin/category/updates". I have a controller
roughly like the following
2006 Mar 19
0
wishlist: revisiting subdomain access in routes.rb
Several folks on the list have, over time, expressed interest in being able
to access the subdomain info inside routes.rb. This was discussed in great
detail late last year by several folks:
http://wrath.rubyonrails.org/pipermail/rails/2006-January/008114.html
In summary, routes can''t access the domain, so your best bet is to stick a
before_filter in your application.rb.
This
2006 Jan 28
0
[Frank] How can I access the domain name in routes.rb?
I am trying to setup an application where the URLs must be of the format
1) sub.domain.com/sub/category
and
2) sub.domain.com/search/something
In the first path the first part of the subdomain must match the folder name.
I tried to use request.domain(2) to get the domain information but keep getting errors.
I was thinking that may be I can setup regexp to math the
2011 Jan 10
0
UTF-8 routes.rb and Passenger vs. Mongrel/WEBrick
My (Rails 3) routes.rb has the following entry:
resources :articles, :path => "記事"
This works in my production environment, as passenger unescapes the
path from /%E8%A8%98%E4%BA%8B to /記事.
However, in my development environment, I''m using Mongrel, which does
not unescape the path, so it does not work unless I change my routes
to
resources :articles, :path =>
2008 Jul 19
2
renaming routes.rb
When you create a new rails app the default home page says to rename
routes.rb. I tried this, but when I run script/console or script/server
I get an error saying the routes.rb file can''t be found. If you rename
this file is there an environment variable holding the location
elsewhere in the application?
--
Posted via http://www.ruby-forum.com/.
2006 Aug 16
1
absolute default route in routes.rb
how do you set a default route in routes.rb
so that anything not recognised will default to :controller => ''home''
map.connect ''*'', :controller => "home"
does not work so well
cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2008 Apr 03
3
routes.rb definitions not working???
Hello Eveyone,
I am new here, and am have no idea how to setup routes in the routes.rb file
while using fbml. The regular
map.resources :gifts
map.resources :wishlists
map.resources :invitations
map.resources :comments
does not work.
This tutorial
http://rfacebook.wordpress.com/2008/02/04/quickstartfacebooker/
says to create a map.root, such as the one mentioned "map.root
2010 Mar 23
1
:has_many and :controller specified in routes.rb
Have an app using older version of Rails (2.3.2) that I need some
routing assistance with if anyone has a minute.
The app was originally designed to be purely html view, and an xml and
json api was hacked on. To keep it clean, we are now moving the first
version of the api (v1) under its own directory (v1) under app/
controllers but still responding to the old paths.
One of the parts of the new
2005 Dec 30
6
Unable to get the domain in my routes.rb to map custom route tables per domain
I have tried all night trying to find a way to get the host name which is
currently being used within my routes.rb file to do some case/when switching
for specific domains such as this
cgi = ActionController::CgiRequest.new(CGI.new)
case cgi.domain(1)
when /www/
map.connect '''', :controller => ''public'', :action =>
''index''
when
2006 May 13
1
newbie question - routes.rb on server
Hello,
I am new to Ruby but not to programming. I have a domain name and server
space with a host who said that ruby on rails should work on the server.
All I want to do is make sure that a test ruby application works online
so that I can begin development on an app. I am able to get the test
program to work locally but not online.
In C:/ruby/projects/test/controllers/TestController.rb:
2011 Sep 07
3
Method get of ActionController::TestCase ignores routes.rb?
Hi!
I''m running into issue which seems to indicate that
ActionController::TestCase.get() method ignores what I have in routes.rb.
Happens in 3.0.10 and 3.1.0 too.
I have the following RSpec2 test of my XmlRpcController#index action:
it "should get nothing in response to GET request" do
get :index
response.response_code.should == 400 #bad_request
end
And the only line
2007 Nov 28
3
overriding rest show route but not delete
hi, lets say routes.rb has
map.resources :foo
and I want the show action to have a diffent url, so I add (after the
above line)
map.foo ''/bar/:id'', :controller => ''foo'', :action => ''show''
this works fine, including foo_path( :id => "1") => /bar/1
and <%= link_to ''Show'', foo %>
2015 Jul 01
2
Custom header when busy
Hi, all
Is there someway ability to insert custom Header to "SIP 486" message, when HANGUP application is invoked?
Our use case is to set that Header, when call-limit is reached, to analyze elsewhere, but we do not want to set some custom causecode in HANGUP application because this can confuse a calling equipment.
2005 Mar 21
3
routes.rb question.
I have a simple program that read all HTML files from a directory and
returns parts of the content and the file names which are HREFs to
those file.
I build the HREF string dynamicaly as PATH_TO_DOC_ROOT + "file_name".
My PATH_TO_DOC_ROOT = http://127.0.0.1:3000/docman/public/docs. So,
the final link that I am interested in might look like this:
2015 Jul 02
2
Custom header when busy
<div>Is there any chance to create feature request for that useful functionality?</div><div>š</div><div>02.07.2015, 14:03, "Rusty Newton" <rnewton@digium.com>:</div><blockquote type="cite"><div><div><div>On Wed, Jul 1, 2015 at 4:46 AM, <span><<a href="mailto:royj@yandex.ru"