My client is looking for a "less AJAXy" why to filter some of their data. I've gotten it half-way there, but could use some guidance.
class Computer < ActiveRecord::Base belongs_to :owner end class Owner < ActiveRecord::Base has_many :computers end map.resources :owners, :has_many => :computers, :active_scaffold => true So, /owners shows each owner, and I was able to nest the computers as a link off each owner. They didn't care for how AJAXy this is, with expanding data inlace. What the client wanted was just a page for each owner, something to link directly to. I see that /owners/1/computers does restrict the list to only the associated records, so I'm almost al the way there. There's two things I can't figure out. 1) What's the best way to customize the page title? In _list_header.html.erb the title is displayed as: <h2><%= active_scaffold_config.list.user.label %></h2> How can I modify this to just say "Computers" on the regular / computers page, and something like "Mike's Computers" on a nested / owners/1/computers page? 2) How can I tell Active Scaffold to hide the Owners column when in this situation? It's awfully redundant. 3) (bonus) Is this the best way to go about proving this functionality? Should I be going down a different ally? -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.
