Sha256: f8e1abb4fcba0b832ec3585f4dd6f657f4b4f3a4dad9836fe67c9cc01a1cd16a

Contents?: true

Size: 693 Bytes

Versions: 19

Compression:

Stored size: 693 Bytes

Contents

#!/usr/bin/env ruby -rubygems

require File.join(File.dirname(__FILE__), 'authentication')


# fetch the collection first
guidebook_collection = StorageRoom::Collection.find('4dda7761b65245fde100005d')
category_collection  = StorageRoom::Collection.find('4dda7761b65245fde100001a')

category = category_collection.entries.resources.first # find the first category
guidebook = guidebook_collection.entry_class.new(:title => 'Bar', :price => 2.23, :category => category, :tags => ['tag1', 'tag2'])

if guidebook.save # save the guidebook with the associated category
  puts "Guidebook Entry saved (#{guidebook[:@url]})"
else
  puts "Guidebook could not be saved: #{entry2.errors.join(', ')}"
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
storage_room-0.3.24 examples/create_entry.rb
storage_room-0.3.23 examples/create_entry.rb
storage_room-0.3.22 examples/create_entry.rb
storage_room-0.3.21 examples/create_entry.rb
storage_room-0.3.20 examples/create_entry.rb
storage_room-0.3.19 examples/create_entry.rb
storage_room-0.3.18 examples/create_entry.rb
storage_room-0.3.17 examples/create_entry.rb
storage_room-0.3.16 examples/create_entry.rb
storage_room-0.3.15 examples/create_entry.rb
storage_room-0.3.14 examples/create_entry.rb
storage_room-0.3.13 examples/create_entry.rb
storage_room-0.3.12 examples/create_entry.rb
storage_room-0.3.11 examples/create_entry.rb
storage_room-0.3.10 examples/create_entry.rb
storage_room-0.3.9 examples/create_entry.rb
storage_room-0.3.8 examples/create_entry.rb
storage_room-0.3.7 examples/create_entry.rb
storage_room-0.3.6 examples/create_entry.rb