Are there a list of common UI patterns to implement collections of "has_many" objects in Rails? -


i end projects containing idioms such "category has_many products". find myself struggling thought process around implementing in user-friendly way.

if take plain scaffolding rails 3.2.3 offers, combined simple_form gem great small, simple apps, given skeleton need create, example, both products , categories.

now in situation of how add many products category. depending on size of potential result set, typically put little search box on page , list child objects @ bottom, , make ajax-y necessary.

but give access this? should on "show" view? or should dispense show action altogether , redirect index list , put additional action on there called "products" right next edit , destroy?

it depends how application flow is. i'm not sure if rails, example in magento (its shop) admin panel, when you're editing category, there tab manage associated products, can view list of 'em , using checkbox assign product category (with more sophisticated filtering). similar product, when editing it, under 'category' tab can use checkboxes assign proper cat.

as rails - if set not big, use list of categories under product, checkboxes or jquery autocomplete field 'facebook style' tags ;-)


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -