Module: Resourceful::Base

Includes:
Default::Accessors, Default::Callbacks, Default::Responses, Default::URLs
Defined in:
lib/vendor/plugins/make_resourceful/lib/resourceful/base.rb

Overview

All modules included by this module are made available to the controller as accessors.

Constant Summary collapse

@@made_resourceful_callbacks =
[]

Class Method Summary collapse

Methods included from Default::URLs

#collection_url_prefix, #edit_object_path, #edit_object_url, #nested_object_path, #nested_object_url, #new_object_path, #new_object_url, #object_path, #object_url, #objects_path, #objects_url, #parent_path, #parent_url, #url_helper_prefix

Methods included from Default::Callbacks

#after, #before, #response_for, #scope

Methods included from Default::Responses

included, #set_default_flash, #set_default_redirect

Methods included from Default::Accessors

#build_object, #current_model, #current_model_name, #current_object, #current_objects, #ensure_parent_exists, #instance_variable_name, #load_object, #load_objects, #load_parent_object, #namespaces, #object_parameters, #parent?, #parent_class_name, #parent_model, #parent_name, #parent_names, #parent_object, #plural?, #plural_action?, #polymorphic_parent?, #polymorphic_parent_name, #save_failed!, #save_succeeded!, #save_succeeded?, #singular?, #singular_action?

Class Method Details

.made_resourceful(&block) ⇒ Object

This method is meant to be called by included classes. It takes a block of the same form as that given to Maker#make_resourceful. The Maker will then run that block along with the blocks given by the individual controllers.



43
44
45
46
47
48
49
# File 'lib/vendor/plugins/make_resourceful/lib/resourceful/base.rb', line 43

def self.made_resourceful(&block)
  if block
    @@made_resourceful_callbacks << block
  else
    @@made_resourceful_callbacks
  end
end