Sha256: 9139949585b7efdca5b25905152d5cc90ac2c6e066bad0b7b59ae22e81e39477

Contents?: true

Size: 405 Bytes

Versions: 19

Compression:

Stored size: 405 Bytes

Contents

# coding: utf-8

class << ActiveRecord::Base
  def has_redditor
    # Include required methods
    # include Redditor::InstanceMethods
    # extend Redditor::ClassMethods

    # Save self as base class (for STI)

    cattr_accessor :redditor_base_class
    self.redditor_base_class = self
    has_one :page, :as => :pageable, class_name: "Redditor::Page"
    accepts_nested_attributes_for :page

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
redditor-0.1.22 lib/redditor/has_redditor.rb
redditor-0.1.20 lib/redditor/has_redditor.rb
redditor-0.1.17 lib/redditor/has_redditor.rb
redditor-0.1.16 lib/redditor/has_redditor.rb
redditor-0.1.15 lib/redditor/has_redditor.rb
redditor-0.1.14 lib/redditor/has_redditor.rb
redditor-0.1.12 lib/redditor/has_redditor.rb
redditor-0.1.11 lib/redditor/has_redditor.rb
redditor-0.1.10 lib/redditor/has_redditor.rb
redditor-0.1.9 lib/redditor/has_redditor.rb
redditor-0.1.8 lib/redditor/has_redditor.rb
redditor-0.1.7 lib/redditor/has_redditor.rb
redditor-0.1.6 lib/redditor/has_redditor.rb
redditor-0.1.5 lib/redditor/has_redditor.rb
redditor-0.1.4 lib/redditor/has_redditor.rb
redditor-0.1.3 lib/redditor/has_redditor.rb
redditor-0.1.2 lib/redditor/has_redditor.rb
redditor-0.1.1 lib/redditor/has_redditor.rb
redditor-0.1.0 lib/redditor/has_redditor.rb