rails/rails — pull request #17881 by deeeki (2014-12-02 11:54:43+00:00)
Title: Allow to unscope where conditions by arel_table with symbol

This commit fixes the following case.

```ruby
User.where(User.arel_table[:created_at].lteq(1.year.ago)).unscope(where :created_at)
```

reproduction on rails console
```
[1] pry(main)> User.where(User.arel_table['created_at'].lteq(1.year.ago)).unscope(where: :created_at).to_sql
=> "SELECT `users`.* FROM `users` WHERE `users`.`deleted_at` IS NULL"
[2] pry(main)> User.where(User.arel_table[:created_at].lteq(1.year.ago)).unscope(where: :created_at).to_sql
=> "SELECT `users`.* FROM `users` WHERE `users`.`deleted_at` IS NULL AND (`users`.`created_at` <= '2013-12-02 11:43:25')"
```

I guess it works before this commit. https://github.com/rails/rails/commit/492bad71f384c71e7e2708d6733d69f478657613