Sha256: 9ed6a2068377d7cbf0a0e41e6d6e9d1f8576c423abb98a92d85936d83a8ea6f8

Contents?: true

Size: 1.66 KB

Versions: 12

Compression:

Stored size: 1.66 KB

Contents

# This is here because responders don't require it.
require 'rails/engine'
require 'responders'
require 'inherited_resources/engine'
require 'inherited_resources/blank_slate'
require 'inherited_resources/responder'

module InheritedResources
  ACTIONS = [ :index, :show, :new, :edit, :create, :update, :destroy ] unless self.const_defined?(:ACTIONS)

  autoload :Actions,            'inherited_resources/actions'
  autoload :BaseHelpers,        'inherited_resources/base_helpers'
  autoload :ShallowHelpers,     'inherited_resources/shallow_helpers'
  autoload :BelongsToHelpers,   'inherited_resources/belongs_to_helpers'
  autoload :ClassMethods,       'inherited_resources/class_methods'
  autoload :DSL,                'inherited_resources/dsl'
  autoload :PolymorphicHelpers, 'inherited_resources/polymorphic_helpers'
  autoload :SingletonHelpers,   'inherited_resources/singleton_helpers'
  autoload :UrlHelpers,         'inherited_resources/url_helpers'
  autoload :VERSION,            'inherited_resources/version'

  # Change the flash keys used by FlashResponder.
  def self.flash_keys=(array)
    Responders::FlashResponder.flash_keys = array
  end
end

ActiveSupport.on_load(:action_controller) do
  # We can remove this check and change to `on_load(:action_controller_base)` in Rails 5.2.
  if self == ActionController::Base
    # If you cannot inherit from InheritedResources::Base you can call
    # inherit_resources in your controller to have all the required modules and
    # funcionality included.
    def self.inherit_resources
      InheritedResources::Base.inherit_resources(self)
      initialize_resources_class_accessors!
      create_resources_url_helpers!
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
inherited_resources-1.13.1 lib/inherited_resources.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/inherited_resources-1.13.0/lib/inherited_resources.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/inherited_resources-1.13.0/lib/inherited_resources.rb
inherited_resources-1.13.0 lib/inherited_resources.rb
inherited_resources-1.12.0 lib/inherited_resources.rb
inherited_resources-1.11.0 lib/inherited_resources.rb
inherited_resources-1.10.0 lib/inherited_resources.rb
inherited_resources-1.10.0.rc1 lib/inherited_resources.rb
inherited_resources-1.9.0 lib/inherited_resources.rb
inherited_resources-1.8.0 lib/inherited_resources.rb
inherited_resources-1.7.2 lib/inherited_resources.rb
inherited_resources-1.7.1 lib/inherited_resources.rb