<% puts params[:action] + 'was the action' %> <% if !['edit', 'new', 'create'].include? params[:action]%> <% # INDEX AND SHOW STUFF %> <% @mega_displays.each do |mega_display| %> <% next if mega_display[:collection_settings] && mega_display[:collection_settings][:display_if_empty] == false && @mega_instance.empty? %> <% @mega_display= mega_display @mf = @mega_display[:model_display_format] @model_display_path = MegaBar::Engine.routes.url_for(controller: '/mega_bar/model_displays', action: 'show', id: @mega_display[:model_display].id, :only_path=> true) %> <%= render partial: "mega_bar_read" %> <%= render partial: "mega_bar_help_links", :locals => {:links => model_display_help_links} %> <% end %> <% else %> <%= form_for(@form_instance_vars) do |f| %> <% @the_form = f %> <% @mega_displays.each do |mega_display| %> <% @mega_display = mega_display @mf = @mega_display[:model_display_format] @model_display_path = MegaBar::Engine.routes.url_for(controller: '/mega_bar/model_displays', action: 'show', id: @mega_display[:model_display].id, :only_path=> true) %> <%=@mf.app_wrapper.html_safe%> <%= render partial: "mega_bar_write" %> <%=@mf.app_wrapper_end.html_safe%> <%= render partial: "mega_bar_help_links",:locals => {:links => model_display_help_links} %> <% end %>
Save<%= submit_tag %>
<% end%> <% end %> <%= render partial: "mega_bar_help_links", :locals => {:links => block_help_links} %> <%= link_to 'Create New ' + @mega_model_properties.name.singularize, link_path('new') %> | <%if ['show'].include? params[:action] %> <%= link_to 'Edit', link_path('edit', @mega_instance[0].id) %> | <%= link_to 'Show', link_path('show', @mega_instance[0].id) %> <% end %>