lib/tickethub/collection.rb in tickethub-0.0.2 vs lib/tickethub/collection.rb in tickethub-0.0.3
- old
+ new
@@ -135,12 +135,12 @@
raise ArgumentError, 'invalid search value type'
end
end
def create(attributes = {})
- @klass.new @endpoint, @endpoint.post(attributes).decoded
+ @klass.load @endpoint, @endpoint.post(attributes).decoded
rescue Tickethub::ResourceInvalid => err
- @klass.new @endpoint, Tickethub::Response.new(err.response).decoded
+ @klass.load @endpoint, Tickethub::Response.new(err.response).decoded
end
def scope(key, params = {}, options = {})
Tickethub::Collection.new @endpoint[key, options.merge(params: params)], @klass,
filters: @filters, order: @order
\ No newline at end of file