Hello,
Currently I have
config/routes.rb:
<pre>
  map.resources :tags do |tags|
    tags.resources :articles, :name_prefix => ''tag_''
  end
</pre>
with tag_articles_path(tag_name) it maps like I want to:
/tags/blah/articles
.. but if I have a tag selected. If I do, for example,
tag_articles_path(:order => ''top'') and at this moment
tag_id is nil, I
get this error:
tag_articles_url failed to generate from {:action=>"index",
:controller=>"articles"} - you may have ambiguous routes, or you
may
need to supply additional parameters for this route.  content_url has
the following required parameters: ["tags", :tag_id,
"articles"] - are
they all satisifed?
I think, this is right... But what should I do if I need to use all this
tag_new_article_path, tag_articles_path(:order => ''top''),
etc ?
I know, I can write all helper methods I need or do something like
current_tag ? tag_articles_path : articles_path
or
articles_path(:tag => current_tag), articles_path(:tag => current_tag,
:order ..) - in this case I do not know how to get good looking urls
(/tag/tag_name/articles)
maybe there are a better way to handle this ?
Thank you.
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---