rails/rails — pull request #11496 by pftg (2013-07-18 19:15:52+00:00)
Title: Removed where_values_hash from AR::NullRelation

In order to build associated records for owners which has not been saved
need to get where values to use as default attributes.
But for new record owner uses `ActiveRecord::NullRelation` which
override `where_values_hash` to return empty hash stub.

`where_values_hash` is not used to invoke any sql query, but good to
build others chains (even will be never executed) like:

```ruby
post = Post.new
admin_comment = post.admin_comments.build

assert_equal 'Admin', admin_comment.author
```

Closes #11376