<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,15 +8,19 @@ class DatabaseController &lt; ApplicationController
   # Delete a table row
   #
   def del_row
-    get_database( params[:id] )
-    get_table( @database, params[:table] )
-    get_fields( @table )
-    @row = @table.find( :all,
-                        :conditions =&gt; [ 'id = ?',
+    if request.post?
+      get_database( params[:id] )
+      get_table( @database, params[:table] )
+      get_fields( @table )
+      @row = @table.find( :all,
+			  :conditions =&gt; [ 'id = ?',
                                          params[:pk] ] ).first
-    if request.post? &amp;&amp; @row
-      @table.del_row( @row[ 'id' ] )
-      flash[:notice] = &quot;row #{ @row[ 'id' ] } deleted&quot;
+      if @row
+	@table.del_row( @row[ 'id' ] )
+	flash[:notice] = &quot;row #{ @row[ 'id' ] } deleted&quot;
+      else
+	flash[:notice] = &quot;row #{ params[:pk] } not found&quot;
+      end
       redirect_to :controller =&gt; :database,
                   :table      =&gt; @table.name,
                   :action     =&gt; :browse,</diff>
      <filename>app/controllers/database_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5f641a4c49dc50d0eb6f6fb09f8258bf7527f9ba</id>
    </parent>
  </parents>
  <author>
    <name>Greg Donald</name>
    <email>gdonald@gmail.com</email>
  </author>
  <url>http://github.com/gdonald/railsdb/commit/917d2621cec9d289bb989d88b769194f81dc4241</url>
  <id>917d2621cec9d289bb989d88b769194f81dc4241</id>
  <committed-date>2008-06-14T10:52:03-07:00</committed-date>
  <authored-date>2008-06-14T10:52:03-07:00</authored-date>
  <message>delete row</message>
  <tree>faacdbf9aad4e999a0823046cd921e51f601ea03</tree>
  <committer>
    <name>Greg Donald</name>
    <email>gdonald@gmail.com</email>
  </committer>
</commit>
