Sha256: 59c59027032c1848d2cb903e5a57076fdd2bc2f483cd0b52f957b514f4d09bf7

Contents?: true

Size: 951 Bytes

Versions: 2

Compression:

Stored size: 951 Bytes

Contents

<div id="<%= @model.plural_name %>_show" class="mdwa_show">
	<div class="page_header">
		<h1><%%= t('<%= @model.plural_name %>.show_title') %></h1>
	</div>

	<div class="inside">
		<%- @model.attributes.each do |attr| %>
			<div class="field">
				<label><%%= t '<%= @model.plural_name %>.index_<%= attr.name %>' %></label>
				<span>
			<%- if !attr.references? %>
		        <%%= @<%= @model.singular_name %>.<%= attr.name %> %>
		    <%- elsif attr.belongs_to? || attr.nested_one? %>
		    	<%%= @<%= @model.singular_name %>.<%= attr.type.singular_name %>.<%= attr.reference %> %>
		    <%- elsif attr.has_many? or attr.nested_many? %>
		        <ul>
		    	<%% @<%= @model.singular_name %>.<%= attr.type.plural_name %>.each do |<%= attr.type.singular_name %>| %>
		   	    	<li><%%= <%= attr.type.singular_name %>.<%= attr.reference %> %> </li>
		    	<%% end %>
		        </ul>
		    <%- end %>
		    	</span>
			</div>
		<%- end %>
	</div>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mdd-2.0.1 lib/generators/mdd/scaffold/templates/views/show.html.erb
mdd-2.0 lib/generators/mdd/scaffold/templates/views/show.html.erb