Ruby on Rails Friday, March 29, 2013

Hi,


thank you for your answers

Le jeudi 28 mars 2013 09:20:10 UTC+1, Cyril Rouyer a écrit :
Hi everybody,

First, sorry for my poor english, I will try to be clear :)

I'm wondering what are the best practices in order to obtain a view showing data on a parent object, with sub-tabs, each tab for a nested resource.

Imagine that you have a Contact model. Each contact has :
  •  documents,
  • participations to meetings,
  •  comments (which could be polymorphic)
  •  ...

When you access to the show page of the contact, you'd like to see contact information at the top of the page, and under these information, a tab-bar, each tab for each nested-resource : documents, meetings, comments, ...

Ho do you do this kind of layouts / views ?

A friend explain me that I can use the inherited_resources gem, which is really useful to abstract and handle nested_controllers, but I still don't find a good solution for the layouts/view.

Thank you by advance

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/wQK0szJt5LcJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment