Class: N::Controller
- Includes:
- Filtering, Render, Scaffolding
- Defined in:
- lib/nitro/controller.rb
Overview
The Controller part in the MVC paradigm. A Controller encpsulates a set of actions.
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Render
#context, #out, #rendering_errors, #request
Class Method Summary collapse
Instance Method Summary collapse
-
#method_missing(action, *args) ⇒ Object
Use the method_missing hook to compile the actions for this controller.
Methods included from Filtering
Methods included from Scaffolding
Methods included from Render
#initialize, #log_error, #redirect, #redirect_referer, #render, #session
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(action, *args) ⇒ Object
Use the method_missing hook to compile the actions for this controller.
22 23 24 25 26 27 28 |
# File 'lib/nitro/controller.rb', line 22 def method_missing(action, *args) if Rendering.compile_action(self.class, action, @base) send(action, *args) else super end end |
Class Method Details
.__old_inherited ⇒ Object
31 |
# File 'lib/nitro/controller.rb', line 31 alias __old_inherited inherited |
.inherited(subclass) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/nitro/controller.rb', line 33 def inherited(subclass) subclass.class_eval %{ DEF_FILE = caller[2].split(':').first } __old_inherited(subclass) end |