Sha256: 7b81c83e6d14d4dbbcde76c1c0cfea9df214560da75557b5ac005c914e8d0ffd

Contents?: true

Size: 624 Bytes

Versions: 18

Compression:

Stored size: 624 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

  belongs_to :author
  belongs_to :coauthor, :class_name => '::Author'
  belongs_to :bestseller, :class_name => '::Author', :foreign_key => :bestseller_guid
  has_one :category
  has_one :main_category, :class_name => '::Category'
  has_one :default_category, :class_name => '::Category', :foreign_key => :template_post_guid

  alias_method :bestseller_guid, :author_guid
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
active_remote-1.7.1 spec/support/models/post.rb
active_remote-1.7.0 spec/support/models/post.rb
active_remote-1.6.1 spec/support/models/post.rb
active_remote-1.6.0 spec/support/models/post.rb
active_remote-1.5.9 spec/support/models/post.rb
active_remote-1.5.8 spec/support/models/post.rb
active_remote-1.5.7 spec/support/models/post.rb
active_remote-1.5.6 spec/support/models/post.rb
active_remote-1.5.5 spec/support/models/post.rb
active_remote-1.5.4 spec/support/models/post.rb
active_remote-1.5.2 spec/support/models/post.rb
active_remote-1.5.1 spec/support/models/post.rb
active_remote-1.5.0 spec/support/models/post.rb
active_remote-1.4.1 spec/support/models/post.rb
active_remote-1.4.0 spec/support/models/post.rb
active_remote-1.3.3 spec/support/models/post.rb
active_remote-1.3.2 spec/support/models/post.rb
active_remote-1.3.1 spec/support/models/post.rb