Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adds create for all CollectionResources

  • Loading branch information...
commit d2e05db33ae4620f33b4a0ed1f50a3b6628ba7e7 1 parent 44e1783
@vesan authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/kippt/collection_resource.rb
View
4 lib/kippt/collection_resource.rb
@@ -9,6 +9,10 @@ def build(attributes = {})
object_class.new(attributes, client)
end
+ def create(attributes = {})
+ build(attributes).save
+ end
+
def [](resource_id)
response = client.get("#{base_uri}/#{resource_id}")
if response.success?
Please sign in to comment.
Something went wrong with that request. Please try again.