lib/fetcha.rb in fetcha-0.1.2 vs lib/fetcha.rb in fetcha-0.1.3
- old
+ new
@@ -44,14 +44,14 @@
fetchable_opts[:filtering][field.to_s] = nil
end
end
def sortable_on(*fields)
- fetchable_opts[:sorting] = Set.new(fields)
+ fetchable_opts[:sorting] = Set.new(fields.map(&:to_s))
end
def scopable_with(*fields)
- fetchable_opts[:scopes] = Set.new(fields)
+ fetchable_opts[:scopes] = Set.new(fields.map(&:to_s))
end
def paginatable(args = {})
fetchable_opts[:pagination].keys.each do |k|
next unless args.keys.include? k