lib/hungry/venue/collection.rb in hungry-0.0.1 vs lib/hungry/venue/collection.rb in hungry-0.1.0
- old
+ new
@@ -1,5 +1,7 @@
+require_relative '../collection'
+
module Hungry
class Venue
class Collection < Hungry::Collection
include Pagination
@@ -14,9 +16,16 @@
all options
end
def tagged_with(*tags)
all tags: (current_tags + tags.flatten).compact.join(',')
+ end
+
+ def maintainable_by(user_or_id)
+ user_id = user_or_id.to_s =~ /^[0-9]+$/ ?
+ user_or_id.to_i : user_or_id.id
+
+ all maintainer_id: user_id
end
def sort_by(subject)
all sort_by: subject
end