Remove a useless variable assignment

We can shortcut the assignment that was in the partial by naming the
object directly.
This commit is contained in:
Matt Rogers 2019-11-26 15:27:19 -06:00
parent 09a380a475
commit eb5c2484a9
No known key found for this signature in database
GPG key ID: 605D017C07EB4316
3 changed files with 2 additions and 6 deletions

View file

@ -14,7 +14,7 @@
<a title="<%= t('shared.toggle_multi_title') %>" accesskey="m" href="#" id="toggle_multi"><%= t('shared.toggle_multi') %></a>
</div>
<%= render :partial => 'todos/new_todo_form', :object => Todo.new %>
<%= render :partial => 'todos/new_multi_todo_form', :object => Todo.new %>
<%= render :partial => 'todos/new_todo_form', :locals => {todo: Todo.new} %>
<%= render :partial => 'todos/new_multi_todo_form', :locals => {todo: Todo.new} %>
</div>

View file

@ -1,5 +1,3 @@
<%- todo = new_multi_todo_form -%>
<div id="todo_multi_add" style="display:none">
<%= form_for(todo, :html=> { :id=>'todo-form-multi-new-action', :name=>'todo', :class => 'inline-form' }) do |t| %>
<input id="default_project_name_id" name="default_project_name" type="hidden" value="<%=h @initial_project_name-%>" />

View file

@ -1,5 +1,3 @@
<%- todo = new_todo_form -%>
<div id="todo_new_action">
<%= form_for(todo, :html=> { :id=>'todo-form-new-action', :name=>'todo', :class => 'inline-form new_todo_form' }) do |t|%>
<input id="default_project_name_id" name="default_project_name" type="hidden" value="<%= h(@initial_project_name)-%>" />