[quote]:action => "atwo/list"[/quote]

that should should :controller => 'atwo', :action => 'list'

-Mike
On May 23, 11:01 am, Mk 27 <rails-mailing-l...@andreas-s.net> wrote:
> Colin Law wrote:
> > Not sure I follow you here, you can certainly link to a different
> > controller
> > from a view, what is that you are trying to do?
>
> > Colin
>
> That is what I am trying to do, perhaps this is a syntax problem.
>
> If I have three controllers under app/, "aone", "atwo", "athree", all of
> them have a method "list", in the view for aone I want to call the list
> method from atwo, so I tried
>
> :action => "atwo/list"
>
> This is a no go -- what's the proper syntax?
>
> Also (another sort of related syntax question), how can I use a
> parameter with the methods?  Here's a line which works in a view:
>
> <li class="link" onclick="<% remote_function(:update => "album_box", url
> => { :action => "list_albums" }) %>">
>
> and here is one which returns "undefined local variable or method
> `url'", the only difference being I tried to pass a parameter via the
> action
>
> <li class="link" onclick="<% remote_function(:update => "album_box", url
> => { :action => "list_albums(#{artist.id})" }) %>">
>                         ^ oh no!
>
> I tried this a few different ways and am about to try a few more ;) Is
> it just the quoting, or what?
>
> --
> 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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to