title: Cannot destroy an object in Rails
body: <p>I cannot use the destroy method on an object using Rails 3.2.6
  This is my code. @checkin finds an object, I checked.</p>
  
  <pre><code>@checkin = Checkin.where("user_id = ? AND event_id = ?", current_user.id, params[:event_id])
  
      if @checkin.destroy
        render :json =&gt; {:results =&gt; @checkin}
      else 
        render :json =&gt; {:errors =&gt; @checkin.errors.full_messages}, status: 422
      end
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>wrong number of arguments (0 for 1)
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This is the stack trace:</p>
  
  <pre><code>activerecord (3.2.6) lib/active_record/relation.rb:378:in `destroy'
  actionpack (3.2.6) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.6) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.6) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.6) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.6) lib/active_support/callbacks.rb:414:in `_run__2516945162825430073__process_action__3384959627746267634__callbacks'
  activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.6) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.6) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.6) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.6) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.6) lib/active_support/notifications.rb:123:in `block in instrument'
  </code></pre>
  
  <p><strong>Update 2 (tried in console)</strong></p>
  
  <pre><code>@checkin = Checkin.where("user_id = ? AND event_id = ?", 46, 1)
    Checkin Load (0.3ms)  SELECT "checkins".* FROM "checkins" WHERE (user_id = 46 AND event_id = 1)
   =&gt; [#&lt;Checkin id: 1, user_id: 46, event_id: 1, created_at: "2012-08-15 14:14:56", updated_at: "2012-08-15 18:18:40"&gt;]
  
  ruby-1.9.2-p290 :009 &gt; @checkin.destroy
  ArgumentError: wrong number of arguments (0 for 1)
      from /Users/dkrusenstrahle/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.6/lib/active_record/relation.rb:378:in `destroy'
      from (irb):9
      from /Users/dkrusenstrahle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.6/lib/rails/commands/console.rb:47:in `start'
      from /Users/dkrusenstrahle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.6/lib/rails/commands/console.rb:8:in `start'
      from /Users/dkrusenstrahle/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.6/lib/rails/commands.rb:41:in `&lt;top (required)&gt;'
      from script/rails:6:in `require'
      from script/rails:6:in `&lt;main&gt;'
  </code></pre>