Skip to content

Commit

Permalink
Fix to button_to in rubrics view delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
hansonywu committed Mar 4, 2012
1 parent 847f669 commit e79c0c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
25 changes: 12 additions & 13 deletions app/views/rubrics/_criterion_editor.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%= remote_form_for criterion,
:as => :rubric_criterion,
:url => {:action => 'update',
:id => criterion.id} do |f| %>
:id => criterion.id} do |f| %>

<h2>
<span id="selected_criterion_name">
Expand All @@ -14,16 +14,6 @@
</div>

<div class="main_rubric_criteria_edit">
<div class="align_text_right">
<%= link_to_function I18n.t(:delete),
remote_function(:url => {:action => 'destroy',
:id => criterion.id},
:confirm => I18n.t(:remove_criteria_message),
:method => 'delete'),
{:class => 'delete',
:title => I18n.t(:remove_criteria_title)} %>
</div>

<span id="<%="criterion_inputs_#{criterion.id}"%>">
<%= f.label :rubric_criterion_name, I18n.t(:criterion), :class => "bold_inline_label" %>
<%= f.text_field :rubric_criterion_name, :class => "fit_to_space" %>
Expand All @@ -37,12 +27,21 @@
</span>
<br />
<br />
<%= f.submit t("rubric_criteria.save")%>
<%= f.submit t("rubric_criteria.save")%>
</div>


<div class="rubric_criteria_levels">
<%= render :partial => 'rubric_criterion_levels', :locals => {:criterion => criterion, :f => f} %>
</div>

<% end %>

<div class="float_right">
<%= button_to I18n.t(:delete),
assignment_rubric_path(:id => criterion.id),
:confirm => I18n.t(:remove_criteria_message),
:method => :delete,
:class => 'delete',
:title => I18n.t(:remove_criteria_title),
:remote => true %>
</div>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

resources :rubrics do
member do
delete 'destroy'
get 'move_criterion'
end

Expand Down

0 comments on commit e79c0c7

Please sign in to comment.