lib/locomotive/steam/adapters/mongodb/query.rb in locomotivecms_steam-1.0.0.pre.beta.2 vs lib/locomotive/steam/adapters/mongodb/query.rb in locomotivecms_steam-1.0.0.pre.beta.3
- old
+ new
@@ -57,9 +57,15 @@
def to_origin
build_origin_query.only(@fields).where(@criteria).order_by(*@sort)
end
+ def key(name, operator)
+ :"#{name}".send(operator.to_sym)
+ end
+
+ alias :k :key
+
private
def build_origin_query
::Origin::Query.new(build_aliases(@localized_attributes, @scope.locale))
end