On Apr 23, 7:26 pm, Aa Wilson <[email protected]>
wrote:
>
> This
>
> sort_link_to 'somesort','somename', @someobjectwithmappedresources
>
> or this
>
> sort_link_to 'somesort','somename', somemappedresource_path
>
> Currently, if I do either, it fails when it tries to merge the generated
> path from the named route with the options given to the helper (which
> makes sense).  If there is some method that will take a hash and convert
> it to a query string that I may then concatenate to the resource path,
> then that would work, but I can not find such a method.

Well given a record you can call polymorphic_path on it (optionally
supplying options to merge in). Hash has a to_query method on it that
will generate a query string.

>
> Also, and if very, very secondary importance, is there a way to access
> controller instance variables in a helper?
>
should just work.

Fred
> Thanks in advance for your time.
> --
> Posted viahttp://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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to