2009/10/2 SNelson <[email protected]>: > > What is the current best practice for displaying records in alternate > ways? > > This relates to an internal scheduling app I'm trying to get off the > ground for our photo studio. > I have a model: Assignment > I'd like the office manager to be able to get a sense of what time > slots are available in the coming week when booking a new assignment. > I hope to use Dan McGrady's WeeklyBuilder plugin. This plugin's index > controller constrains the returned data to a five day range, and the > index view presents it nicely in a week format using a specific > stylesheet. > > However, I can also see the need to just present a list of > assignments, newest to oldest, using the app's generic application > layout and stylesheet. (And maybe, if I get really ambitions, a month > view.) > > I don't object to having the default display of assignments be the > weekly presentation because I feel that's likely to be the most used > feature. But what would be the best practice to alternatively find all > assignments and render them to a condensed list-like view using the > application layout and stylesheet?
You could use a parameter in the index url to specify which mode you want, then render a different view or use logic in the view to show it appropriately. Use partials for the common bits. Or is that not the question you are asking? 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 -~----------~----~----~----~------~----~------~--~---

