Sha256: 578fac8fe93d7fa0247030a2e16cd5d32ea4215aa6779895f50a84870cd4aa56
Contents?: true
Size: 731 Bytes
Versions: 12
Compression:
Stored size: 731 Bytes
Contents
require "detour/engine" require "detour/acts_as_flaggable" require "detour/flaggable" require "detour/flag_form" require "detour/configuration" module Detour # Allows for configuration of Detour::Feature, mostly intended # for defining groups: # # @example # Detour.configure do |config| # config.define_user_group :admins do |user| # user.admin? # end # end def self.configure(&block) ActionDispatch::Reloader.to_prepare do yield Detour.config Detour.config.flaggable_types.each { |f| f.constantize } end end def self.config @config ||= Detour::Configuration.new end end if defined?(ActiveRecord::Base) ActiveRecord::Base.extend Detour::ActsAsFlaggable end
Version data entries
12 entries across 12 versions & 1 rubygems