Skip to content

Instantly share code, notes, and snippets.

@samspoon
Created February 12, 2010 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samspoon/a3676da061799ac6e29d to your computer and use it in GitHub Desktop.
Save samspoon/a3676da061799ac6e29d to your computer and use it in GitHub Desktop.
<h1>New category</h1>
<% form_for(category) do |f| %>
<%= error_messages_for :category %>
<p>
<b>Business category</b><br />
<%= f.text_field :business_category %>
</p>
<p>
<%= f.submit "Create" %>
</p>
<% end %>
<h1>New address</h1>
<% form_for(address) do |f| %>
<%= error_messages_for :address %>
<p>
<b>House number</b><br />
<%= f.text_field :house_number %>
</p>
<p>
<b>Street name</b><br />
<%= f.text_field :street_name %>
</p>
<p>
<b>City</b><br />
<%= f.text_field :city %>
</p>
<p>
<b>County</b><br />
<%= f.text_field :county %>
</p>
<p>
<b>Postcode</b><br />
<%= f.text_field :postcode %>
</p>
<p>
<%= f.submit "Create" %>
</p>
<% end %>
<h1>New business</h1>
<%= error_messages_for :business %>
<% form_for(@business) do |f| %>
<p>
<b>Business name</b><br />
<%= f.text_field :business_name %>
</p>
<p>
<b>Telephone</b><br />
<%= f.text_field :telephone %>
</p>
<p>
<b>Website</b><br />
<%= f.text_field :website %>
</p>
<p>
<%= f.submit "Create" %>
</p>
<% end %>
<%= render :partial=>"new_address", :locals=>{ :address=>Address.new} %>
<%= render :partial=>"new_category", :locals=>{ :category=>Category.new} %>
<%= link_to 'Back', businesses_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment