Sha256: d6a31408960a7cb11df78c77996738f0bccc63ce0111db32e177a085c9b6de99

Contents?: true

Size: 496 Bytes

Versions: 1

Compression:

Stored size: 496 Bytes

Contents

require "active_record"
require "commentable/comment"
require "commentable/user"

module Commentable
  autoload :Version, "commentable/version"
  autoload :InstanceMethods, "commentable/instance_methods"
  autoload :ClassMethods, "commentable/class_methods"

  def self.extended(base)
    base.class_eval do
      include InstanceMethods
      extend ClassMethods

      class << self
        attr_accessor :commentable_options
      end
    end
  end
end

ActiveRecord::Base.extend(Commentable)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
commentable-0.1.0 lib/commentable.rb