Displaying 2 results from an estimated 2 matches for "named_route_url".
2006 Jul 23
4
Anything like with_scope for ActionController?
...d> being used by the action/controller pair. It''s
identifying a container object whose contains are operated on by the
actions.
I currently have this working with routes, however I need to tack on
an extra parameter to all the url generating functions (url_for,
form_start_tag, named_route_url...) to get the mapping to pick up the
custom URL parameter. Having to remember to
append :short_name=>@my_object.short_name (with or without to_param
magic), is getting annoying and the repetition is getting ugly.
Is there anything like ActiveRecord''s with_scope function to &quo...
2006 Sep 05
1
Named routes and current_page? incompatibility
Hi,
I have some named routes defined e.g. map.public and wish to use
link_to_unless_current() to disable link.
However, as I''ve seen from forum discussions and the API doc, the issue
lies with the fact that the named_route_url() method generated by a
named route does not default to only_path = true like url_for.
Therefore, the current_page? within link_to_unless_current() will not
match.
Apparently there is a recent alternative so that _path on all named
routes is also provided with _url. I tried this (e.g. using
p...