Hello: Currently, I have a views/x/list.rhtml. Normally, one would post to its controller, controllers/x_controller.rb, but I am actually posting to controllers/y_controller.rb in order to call the list method of y, create a filtered model for y, and display list view for y. So, this works, but I understand that calling my y controller from my view x is not the best architectural way to do things. So, I am thinking that I need to post to x''s controller using a method maybe called "listy". listy will then invoke y controller''s list method. How do I do this? y controller''s list method will also need to receive a parameter from x controller''s listy method. Thanks, Dan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hello: I am interested in finding a good architectural way to call a different controller from a current view. The example is for a parent-child relationship. When the user presses a button (in the parent form) in order to get the child form, I currently just call the list method of the child''s controller using the post method of the parent form. Perhaps, architecturally, it may be cleaner to call something like a "listchildren" method within the parent controller, that is if the philosophy is to keep controllers, models, and views concerning the same table/model. Since I currently send the id of the child record to the list method of the child, I would now have to send the id of the child record to the listchildren method of the parent controller. Then, I assume the parent controller would just call the child controller and just pass along the child id as a parameter. So, my question is how is this done with Ruby On Rails code? Thanks, Dan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---