Skip to content

Commit

Permalink
Moved the form to form partial
Browse files Browse the repository at this point in the history
  • Loading branch information
gregbell committed Apr 9, 2010
1 parent 73b1919 commit c34fd62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<% semantic_form_for resource do |f| %>
<%= f.inputs %>
<%= f.buttons %>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<h2>Create <%= resource_name %></h2>
<% semantic_form_for resource do |f| %>
<%= f.inputs %>
<%= f.buttons %>
<% end %>
<%= render_partial_or_default 'form' %>
4 changes: 4 additions & 0 deletions test/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,8 @@ def setup
assert_select "form"
end

test "should render using the form partial" do
assert_template :partial => '_form'
end

end

0 comments on commit c34fd62

Please sign in to comment.