2017-10-30 01:44:23 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Rating
|
2018-02-08 15:29:20 +00:00
|
|
|
class << self
|
|
|
|
def config
|
|
|
|
@config ||= Config.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def configure
|
|
|
|
yield config
|
|
|
|
end
|
|
|
|
end
|
2017-10-30 01:44:23 +00:00
|
|
|
end
|
|
|
|
|
2018-02-08 15:29:20 +00:00
|
|
|
require 'rating/config'
|
2017-10-30 01:44:23 +00:00
|
|
|
require 'rating/models/rating/extension'
|
|
|
|
require 'rating/models/rating/rate'
|
|
|
|
require 'rating/models/rating/rating'
|
|
|
|
|
|
|
|
ActiveRecord::Base.include Rating::Extension
|