Sha256: 6159f66d4a3ca0fa3a1a246cbcb068f3df3ca329b1f952a1f401f1acae298f30

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require "active_record"
require "active_support/inflector"
require "active_support/dependencies/autoload"

$LOAD_PATH.unshift(File.dirname(__FILE__))

module ActsAsVotable
  extend ActiveSupport::Autoload

  autoload :Votable
  autoload :Vote
  autoload :Voter
  autoload :Cacheable
  autoload :Extenders
  autoload :Helpers

  if defined?(ActiveRecord::Base)
    ActiveRecord::Base.extend ActsAsVotable::Extenders::Votable
    ActiveRecord::Base.extend ActsAsVotable::Extenders::Voter
  end
end

ActiveSupport.on_load(:action_controller) do
  include ActsAsVotable::Extenders::Controller
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_votable-0.14.0 lib/acts_as_votable.rb