Class: InheritedResources::Base
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- InheritedResources::Base
- Defined in:
- lib/vendor/plugins/inherited_resources/lib/inherited_resources/base.rb
Overview
Base
This is the base class that holds all actions. If you see the code for each action, they are quite similar to Rails default scaffold.
To change your base behavior, you can overwrite your actions and call super, call default
class method, call <actions
class method or overwrite some helpers in the base_helpers.rb file.
Direct Known Subclasses
AccountsController, AddressesController, Admin::AddressesController, Admin::BackpacksController, Admin::DesksController, BedsController, BooksController, CarsController, CentersController, ChairsController, CitiesController, CommentsController, DeansController, DishesController, EmployeesController, FoldersController, HousesController, MachinesController, ManagersController, OwnersController, PaintersController, PetsController, ProductsController, ProfessorsController, PuppetsController, ReadersController, RoomsController, SchoolsController, TablesController, TreesController, UniversesController
Instance Attribute Summary
Attributes inherited from ActionController::Base
Class Method Summary collapse
-
.inherit_resources(base) ⇒ Object
Overwrite inherit_resources to add specific InheritedResources behavior.
Methods included from DSL
Methods inherited from ActionController::Base
clear_respond_to, respond_to, #respond_to, #respond_with, #responder
Class Method Details
.inherit_resources(base) ⇒ Object
Overwrite inherit_resources to add specific InheritedResources behavior.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/vendor/plugins/inherited_resources/lib/inherited_resources/base.rb', line 16 def self.inherit_resources(base) base.class_eval do include InheritedResources::Actions include InheritedResources::BaseHelpers extend InheritedResources::ClassMethods extend InheritedResources::UrlHelpers # Add at least :html mime type respond_to :html helper_method :collection_url, :collection_path, :resource_url, :resource_path, :new_resource_url, :new_resource_path, :edit_resource_url, :edit_resource_path, :parent_url, :parent_path, :resource, :collection, :resource_class, :association_chain base. :instance_writer => false do |c| c.class_inheritable_accessor :resource_class c.class_inheritable_array :parents_symbols c.class_inheritable_hash :resources_configuration, :scopes_configuration end protected :resource_class, :parents_symbols, :resources_configuration, :scopes_configuration end end |