Permalink
Browse files

Fixed navigation after removing report. Cleaned up report edit form

  • Loading branch information...
1 parent 1a16c32 commit d24bfa8fb8911c01f889e6175a52804bcc50315a Oliver Searle-Barnes committed Mar 22, 2010
Showing with 6 additions and 6 deletions.
  1. +1 −1 app/controllers/reports_controller.rb
  2. +4 −1 app/views/reports/_form.html.erb
  3. +1 −4 app/views/reports/edit.html.erb
@@ -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
@@ -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 %>
@@ -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.