Sha256: 99251665257f95d41f8ac54c59eb92135255065163a3b7397f809b0e3020fca2

Contents?: true

Size: 567 Bytes

Versions: 24

Compression:

Stored size: 567 Bytes

Contents

require 'support/protobuf/post.pb'

##
# Define a generic class that inherits from active remote base
#
class Post < ::ActiveRemote::Base
  service_class ::Generic::Remote::PostService

  attribute :guid
  attribute :name
  attribute :author_guid
  attribute :user_guid
  attribute :bestseller_guid

  belongs_to :author
  belongs_to :coauthor, :class_name => '::Author'
  belongs_to :bestseller, :class_name => '::Author', :foreign_key => :bestseller_guid
  belongs_to :user, :class_name => '::Author', :scope => :user_guid

  validates :name, :presence => true
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
active_remote-2.3.2 spec/support/models/post.rb
active_remote-2.3.1 spec/support/models/post.rb
active_remote-2.3.0 spec/support/models/post.rb
active_remote-2.2.0 spec/support/models/post.rb