<% if RAILS_ENV == 'development' %> <% if current_user %> <% form_tag generate_template_admin_document_path(@document.id) do %> <% end %>

The template created will be app/views/pages/<%= @document.meta_definition.label_path.gsub('/', '.') %>.html.erb

<% else %>

Login to create a blank template

<% end %> <% else %> <% raise "No Template Found for #{request.path}" %> <% end %>