lib/approval.rb in approval-0.3.5 vs lib/approval.rb in approval-0.3.6
- old
+ new
@@ -1,17 +1,20 @@
module Approval
def self.config
- @_config ||= Config.new
+ @config ||= Config.new
end
def self.configure
yield config
end
def self.init!
user_model = Approval.config.user_class_name.safe_constantize
- user_model.include ::Approval::Mixins::User if user_model
- [Approval::Request, Approval::Comment].each(&:define_user_association)
+
+ if user_model
+ ::Approval::Request.define_user_association
+ ::Approval::Comment.define_user_association
+ end
end
end
require "approval/config"
require "approval/engine" if defined?(::Rails)