byroot/rails3_acts_as_paranoid — pull request #1 by yuki24 (2013-03-19 11:03:05+00:00)
Title: belongs_to_with_deleted should pass scope to belongs_to_without_deleted

From Rails 4, [`#belongs_to` method take 3 arguments](https://github.com/rails/rails/blob/a1bb6c8b06db83546179175b9b2dde7912c86f9b/activerecord/lib/active_record/associations.rb#L1396-L1398):

```ruby
# activerecord/lib/active_record/associations.rb:1396
def belongs_to(name, scope = nil, options = {})
Builder::BelongsTo.build(self, name, scope, options)
end
```

So `#belongs_to_with_deleted` method should also take `scope` argument nad pass it to `#belongs_to_without_deleted` method.

Without this implementation, we will get `NoMethodError` when `scope` is given like this:

```ruby
belongs_to :product, -> { includes(:manufacturer) }
# lib/acts_as_paranoid/associations.rb:12:in `belongs_to_with_deleted': undefined method `delete' for # (NoMethodError)
```

Also, I think you should merge this PR before goncalossilva/rails3_acts_as_paranoid/pull/102 is merged.