Sha256: 6a9c51ee445283ae3ab4b6febfed3fca703237a61ad3a71e62c5b8f41e4711cc

Contents?: true

Size: 846 Bytes

Versions: 10

Compression:

Stored size: 846 Bytes

Contents

# respond_to is the only file that should be loaded before hand. All others
# are loaded on demand.
#
unless defined?(ActionController::Responder)
  require File.join(File.dirname(__FILE__), 'inherited_resources', 'legacy', 'responder')
  require File.join(File.dirname(__FILE__), 'inherited_resources', 'legacy', 'respond_to')
end

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

class ActionController::Base
  # If you cannot inherit from InheritedResources::Base you can call
  # inherit_resource 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

Version data entries

10 entries across 10 versions & 5 rubygems

Version Path
JackDanger-inherited_resources-0.9.1 lib/inherited_resources.rb
emmanuel-inherited_resources-0.9.1 lib/inherited_resources.rb
emmanuel-inherited_resources-0.9.2 lib/inherited_resources.rb
josevalim-inherited_resources-0.9.0 lib/inherited_resources.rb
josevalim-inherited_resources-0.9.1 lib/inherited_resources.rb
inherited_resources-0.9.5 lib/inherited_resources.rb
inherited_resources-0.9.4 lib/inherited_resources.rb
inherited_resources-0.9.3 lib/inherited_resources.rb
inherited_resources-0.9.2 lib/inherited_resources.rb
base_rails_app-0.0.1 lib/vendor/plugins/inherited_resources/lib/inherited_resources.rb