Homepage_url?

does the routes.rb have some kind of automatic generated url_for a ‘’
map.connect?
(say, something like url_for_homepage or homepage_url) …i’ve looked
around, tried a couple of combos but nothing really worked. do i have
the wrong lead?

?

thanks…

On 7/2/06, jeff [email protected] wrote:

does the routes.rb have some kind of automatic generated url_for a ‘’
map.connect?
(say, something like url_for_homepage or homepage_url) …i’ve looked
around, tried a couple of combos but nothing really worked. do i have
the wrong lead?

?

thanks…

At the end of your routes map use something like
map.connect ‘/’, :controller => ‘default_controller’, :action =>
‘default_action’

but be sure to remove the index.html from your public directory. If
that is
in there it will be served instead of any action specified in the
routes.

…i was actually hoping to see if there was some kind of automatic
method (for all of my views?) that is generated when i do the action
you’ve specified (ie, map.connect ‘’ , :controller =>…)
i happen to know there is a actionname_url method or something similar
that is generated when you map.connect some actionname, and i was
wondering if there was a convention for a ‘’ map.connect…if not, then
not, although i am pretty sure i saw some posting on
wiki.rubyonrails.com, but then again, after looking through it a second
time today, and not finding it, i’m not really sure anymore.

?

jeff wrote:

?

Used named routes and you can explicitly set what you want it to be
called.

IE:

map.homepage …

instead of:

map.connect …

Then homepage_url will work.

hth

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs