Reputation: 61
Does anyone know why according to Rubymine this is acceptable where({name: 'Jim'})
but this where(name: 'Jim')
causes a deprecation warning which reads
"Supplying any condition to the finder or calculation methods is deprecated."
Upvotes: 3
Views: 637
Reputation: 1107
There was an issue in RubyMine 5.4 Beta that is already fixed in the final release.
Upvotes: 3
Reputation: 11588
Because you no longer need to specify a :conditions
option to the query method where
as was required with the find
family of methods before Rails 3.x. You simply pass the Hash of conditions to where
directly. For example, instead of this:
where(conditions: {name: 'Bob'})
you can simply call:
where(name: 'bob')
Upvotes: 0