Skip to content

Commit

Permalink
use resource_name instead of model.underscore in edit, new and _form …
Browse files Browse the repository at this point in the history
…templates
  • Loading branch information
glanotte committed Mar 2, 2012
1 parent 605b1b8 commit 8ee4ca5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/generators/bootstrap/themed/templates/_form.html.erb
@@ -1,4 +1,4 @@
<%%= form_for @<%= model_name.underscore %>, :html => { :class => 'form-horizontal' } do |f| %>
<%%= form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
<fieldset>
<legend><%%= controller.action_name.capitalize %> <%= model_name.titleize %></legend>

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/bootstrap/themed/templates/edit.html.haml
@@ -1,3 +1,3 @@
= form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= model_name.underscore %>", :id => "edit_<%= model_name.underscore %>" } do |f|
= form_for @<%= resource_name %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= resource_name %>", :id => "edit_<%= resource_name %>" } do |f|
%input{:name => "_method", :type => "hidden", :value =>"put"}
= render :partial => "form", :locals => {:f => f}
2 changes: 1 addition & 1 deletion lib/generators/bootstrap/themed/templates/edit.html.slim
@@ -1,3 +1,3 @@
= form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= model_name.underscore %>", :id => "edit_<%= model_name.underscore %>" } do |f|
= form_for @<%= resource_name %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => "edit_<%= resource_name %>", :id => "edit_<%= resource_name %>" } do |f|
input name="_method" type="hidden" value="put"
= render :partial => "form", :locals => {:f => f}
2 changes: 1 addition & 1 deletion lib/generators/bootstrap/themed/templates/new.html.haml
@@ -1,2 +1,2 @@
= form_for @<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
= form_for @<%= resource_name %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
= render :partial => "form", :locals => {:f => f}
2 changes: 1 addition & 1 deletion lib/generators/bootstrap/themed/templates/new.html.slim
@@ -1,2 +1,2 @@
= form_for @<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
= form_for @<%= resource_name %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
= render :partial => "form", :locals => {:f => f}

0 comments on commit 8ee4ca5

Please sign in to comment.