Sha256: 9f4b99fbbc15ed79b3b61e17d0024c7aae247ebadb31ca87f7be704fb7672314

Contents?: true

Size: 667 Bytes

Versions: 18

Compression:

Stored size: 667 Bytes

Contents

class Contact < Restly::Base

  field :first_name
  field :last_name
  field :created_at
  field :updated_at

  has_many_resources :comments
  has_many_resources :posts

end

class Post < Restly::Base

  field :title
  field :body
  field :created_at
  field :updated_at

  belongs_to_resource :contact
  has_many_resources  :comments
  has_one_resource    :rating

end

class Comment < Restly::Base

  # root_accessible false # Todo

  field :content
  field :created_at
  field :updated_at

  belongs_to_resource :contact
  embedded_in :post

end

class Rating < Restly::Base

  # root_accessible false # Todo

  field :stars
  field :count

  belongs_to :post

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
restly-0.0.1.beta.10 spec/support/shared.rb
restly-0.0.1.beta.9 spec/support/shared.rb
restly-0.0.1.beta.6 spec/support/shared.rb
restly-0.0.1.beta.5 spec/support/shared.rb
restly-0.0.1.beta.4 spec/support/shared.rb
restly-0.0.1.beta.3 spec/support/shared.rb
restly-0.0.1.beta.2 spec/support/shared.rb
restly-0.0.1.beta.1 spec/support/shared.rb
restly-0.0.1.alpha.22 spec/support/shared.rb
restly-0.0.1.alpha.19 spec/support/shared.rb
restly-0.0.1.alpha.18 spec/support/shared.rb
restly-0.0.1.alpha.16 spec/support/shared.rb
restly-0.0.1.alpha.12 spec/support/shared.rb
restly-0.0.1.alpha.11 spec/support/shared.rb
restly-0.0.1.alpha.10 spec/support/shared.rb
restly-0.0.1.alpha.9 spec/support/shared.rb
restly-0.0.1.alpha.8 spec/support/shared.rb
restly-0.0.1.alpha.7 spec/support/shared.rb