Skip to content

Commit

Permalink
fixed a few form issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ksylvest committed Mar 2, 2012
1 parent b62e54b commit a76f1f6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions lib/generators/attached/templates/_form.html.haml
@@ -0,0 +1,6 @@
= formula_form_for(@<%= singular_table_name %>) do |form|
<%- attributes.each do |attribute -%>
= form.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
<%- end -%>

= form.button :submit
2 changes: 1 addition & 1 deletion test/dummy/app/views/contacts/edit.html.haml
@@ -1,4 +1,4 @@
%h1
Edit
%small Contact
= render 'form', contact: @contact
= render 'form', :contact => @contact
2 changes: 1 addition & 1 deletion test/dummy/app/views/contacts/new.html.haml
@@ -1,4 +1,4 @@
%h1
New
%small Contact
= render 'form', contact: @contact
= render 'form', :contact => @contact
2 changes: 1 addition & 1 deletion test/dummy/app/views/layouts/application.html.haml
Expand Up @@ -9,7 +9,7 @@
.navbar.navbar-fixed-top
.navbar-inner
.container
= link_to 'Formula', root_path, class: 'brand'
= link_to 'Formula', root_path, :class => 'brand'
%ul.nav
%li= link_to 'Contacts', contacts_path
%ul.nav.pull-right
Expand Down

0 comments on commit a76f1f6

Please sign in to comment.