On 26 September 2010 03:36, nobosh <[email protected]> wrote: > Once my Rails 3 app is loaded, a user can click an item which needs to > then load a dynamic subnav. > > My thinking is (since it needs to be dynamic) is onClick to make a > jQuery AJAX call to the server and then to inject the HTML response > into a DIV on the page... > > What I'd like your advice on is how/where the subnav logic should live > in the rails app, as I don't have a navigation controller or view... > But maybe I should have one? > > Do I create a navigation controller? Or use the application > controller? I also have a pages controller that I use for the landing > page, about, contact, etc...
I don't think there is a 'correct' answer to this, it depends entirely on your specific application. Generally if you put something in what seems intuitively to you to be the right place you will not go far wrong. Also make sure you write good automated tests so you can easily re-factor when you realise you did not get it right the first time, so you can move stuff about secure in the knowledge that you have probably not broken anything. Colin -- 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.

