Sha256: a271561eb75d279c912ab2009fc4c33e773140302992460d36682309ab5055d6

Contents?: true

Size: 773 Bytes

Versions: 11

Compression:

Stored size: 773 Bytes

Contents

require "support/protobuf/author.pb"

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

  attribute :guid, :string
  attribute :name, :string
  attribute :user_guid, :string
  attribute :chief_editor_guid, :string
  attribute :editor_guid, :string
  attribute :category_guid, :string
  attribute :age, :integer
  attribute :birthday, :datetime
  attribute :writes_fiction, :boolean
  attribute :net_sales, :float

  has_many :posts
  has_many :user_posts, :class_name => "::Post", :scope => :user_guid
  has_many :flagged_posts, :class_name => "::Post"
  has_many :bestseller_posts, :class_name => "::Post", :foreign_key => :bestseller_guid

  belongs_to :category
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
active_remote-6.0.3 spec/support/models/author.rb
active_remote-6.1.2 spec/support/models/author.rb
active_remote-7.0.0 spec/support/models/author.rb
active_remote-6.1.1 spec/support/models/author.rb
active_remote-6.1.0 spec/support/models/author.rb
active_remote-6.0.2 spec/support/models/author.rb
active_remote-6.0.1 spec/support/models/author.rb
active_remote-6.0.0.beta spec/support/models/author.rb
active_remote-5.2.0 spec/support/models/author.rb
active_remote-5.2.0.beta spec/support/models/author.rb
active_remote-5.2.0.alpha spec/support/models/author.rb