title: Cannot delete record after using Rails default scope with associations
body: <p>I have tables <code>emails</code> and <code>users</code>. The <code>emails</code> table has two fields: <code>user_id</code> and <code>publish_id</code>.</p>
  
  <p>I have used a default scope like this:</p>
  
  <pre><code>default_scope joins('LEFT OUTER JOIN users ON users.id = emails.publish_id').where("users.status IN (?)", ["approve", "spam"])`
  </code></pre>
  
  <p>As the <code>users</code> table holds <code>publishers</code> and <code>subscribers</code>, so I have used <code>users_id</code> to associate with <code>subscribers</code> and <code>publish_id</code> to associate with <code>publishers</code>.</p>
  
  <p>I am fetching a record using:</p>
  
  <pre><code>email = Email.unscoped.find(:id)
  email.delete
  </code></pre>
  
  <p>But, I get the following error:</p>
  
  <p>Can someone tell me how can I remove this or how can I force remove delete the email?</p>
  
  <p>Complete error message :-</p>
  
  <pre><code> em=Email.unscoped.last
    Email Load (0.5ms)  SELECT `emails`.* FROM `emails` ORDER BY `emails`.`id` DESC LIMIT 1
   =&gt; #&lt;Email id: 4, user_id: 2, body: "asdasd", complete_email: {}, created_at: "2013-08-28 15:29:10", updated_at: "2013-08-28 15:29:10", snapshot_status: nil, thumbnail: nil, deleted_at: nil, read: nil, publish_id: 1, email_type: nil, snapshot_thumb_file_name: nil, snapshot_thumb_content_type: nil, snapshot_thumb_file_size: nil, snapshot_thumb_updated_at: nil&gt; 
  1.9.3p448 :017 &gt; em.delete
    SQL (0.5ms)  UPDATE `emails` SET `deleted_at` = '2013-08-28 15:29:24' WHERE `emails`.`id` = 4 AND (`emails`.`deleted_at` IS NULL) AND (users.status IN ('approve','spam'))
  ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'users.status' in 'where clause': UPDATE `emails` SET `deleted_at` = '2013-08-28 15:29:24' WHERE `emails`.`id` = 4 AND (`emails`.`deleted_at` IS NULL) AND (users.status IN ('approve','spam'))
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `execute'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:211:in `execute'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:238:in `exec_delete'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `update'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/relation.rb:294:in `update_all'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/acts_as_paranoid-0.4.2/lib/acts_as_paranoid/relation.rb:24:in `delete_all'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/relation.rb:442:in `delete'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/querying.rb:7:in `delete'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/activerecord-3.2.13/lib/active_record/persistence.rb:119:in `delete'
      from (irb):17
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
      from /home/awsome/.rvm/gems/ruby-1.9.3-p448@awsome/gems/railties-3.2.13/lib/rails/commands.rb:41:in `&lt;top (required)&gt;'
      from script/rails:6:in `require'
  </code></pre>
  
  <p>Following is the User class definition :-</p>
  
  <pre><code>User
   =&gt; User(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime, provider: string, uid: string, name: string, username: string, role: string, photo_file_name: string, photo_content_type: string, photo_file_size: integer, photo_updated_at: datetime, confirmation_token: string, confirmed_at: datetime, confirmation_sent_at: datetime, unconfirmed_email: string, tag_listing: string, status: string, private_publisher: boolean, public_wall_display: boolean, personal_email: string)
  </code></pre>