Skip to content

Commit

Permalink
Fixed navigation after removing report. Cleaned up report edit form
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Searle-Barnes committed Mar 22, 2010
1 parent 1a16c32 commit d24bfa8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ def destroy
@report = Report.find(params[:id])
@report.destroy
flash[:notice] = "Successfully destroyed report."
redirect_to reports_url
redirect_to database_url(@report.database)
end
end
5 changes: 4 additions & 1 deletion app/views/reports/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
<%= f.label :query %><br />
<%= f.text_field :query %>
</p>
<p><%= f.submit "Save" %></p>
<p>
<%= f.submit "Save" %>
<%= link_to "Cancel", @report %>
</p>
<% end %>
5 changes: 1 addition & 4 deletions app/views/reports/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
<%= render :partial => 'form' %>

<p>
<%= link_to "Show", @report %> |
<%= link_to "View All", database_reports_path(@database) %>
</p>

0 comments on commit d24bfa8

Please sign in to comment.