For example, I might have an partial something like:
<div>
<%= f.label :some_field %><br/>
<%= f.text_field :some_field %>
</div>
which works for edit AND new actions. I also will have one like:
<div>
<%=h some_field %>
</div>
for the show action. So you would think that all your partials go under one directory like shared
or something. The problem that I see with this is that both of these would cause a conflict since they are essentially the same partial but for different actions so what I do is:
<!-- for edit and new actions -->
<%= render "shared_edit/some_partial" ... %>
<!-- for show action -->
<%= render "shared_show/some_partial" ... %>
How do you handle this? Is a good idea or even possible to maybe combine all of these actions into one partial and render different parts by determining what the current action is?