Sha256: 70cac31b4e27060c4854455b82fcfa6c69698547f1474b5883d085e30f1280ce

Contents?: true

Size: 1013 Bytes

Versions: 5

Compression:

Stored size: 1013 Bytes

Contents

require 'acts_as_voteable'
require 'acts_as_voter'
require 'has_karma'
require 'thumbs_up/configuration'
require 'thumbs_up/base'
require 'thumbs_up/version'

module ThumbsUp

  class << self

    # An ThumbsUp::Configuration object. Must act like a hash and return sensible
    # values for all ThumbsUp::Configuration::OPTIONS. See ThumbsUp::Configuration.
    attr_writer :configuration

    # Call this method to modify defaults in your initializers.
    #
    # @example
    #   ThumbsUp.configure do |config|
    #     config.voteable_relationship_name = :votes_on
    #     config.voter_relationship_name    = :votes_by
    #   end
    def configure
      yield(configuration)
    end

    # The configuration object.
    # @see ThumbsUp::Configuration
    def configuration
      @configuration ||= Configuration.new
    end
  end

end

ActiveRecord::Base.send(:include, ThumbsUp::ActsAsVoteable)
ActiveRecord::Base.send(:include, ThumbsUp::ActsAsVoter)
ActiveRecord::Base.send(:include, ThumbsUp::Karma)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thumbs_up-0.6.10 lib/thumbs_up.rb
thumbs_up-0.6.9 lib/thumbs_up.rb
thumbs_up-0.6.8 lib/thumbs_up.rb
thumbs_up-0.6.7 lib/thumbs_up.rb
thumbs_up-0.6.6 lib/thumbs_up.rb