Use AR #where instead of #order in #apply_options_to_scope for option wi...

...th condition