Sha256: f7eb32bb2e3b1a245e03cd033b9194db7366048d06b597cbfe29577fa4ade11c

Contents?: true

Size: 567 Bytes

Versions: 7

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

7 entries across 7 versions & 1 rubygems

Version Path
active_remote-5.0.1 spec/support/models/post.rb
active_remote-5.1.1 spec/support/models/post.rb
active_remote-5.1.0 spec/support/models/post.rb
active_remote-5.0.0 spec/support/models/post.rb
active_remote-5.1.0.rc1 spec/support/models/post.rb
active_remote-5.0.0.rc1 spec/support/models/post.rb
active_remote-5.0.0.pre spec/support/models/post.rb