New Discussion

Notifications

You’re not receiving notifications from this thread.

Dynamic Partial Rendering Discussion

0
General

I think if you do this, the composition of the shown attributes should be the other way around:
Call <%= render @property %> in your show action and place the common attributes (type, address, type, bedrooms) in a shared partial between the single and multi property views. It makes it clear what to expect to be rendered when looking at a specialized partial. Also when using the partial in other places, it will output all the property attributes as I would expect from a partial that is called something like single_unit_property.

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.