Module: Airbed::Resources
- Defined in:
- lib/airbed.rb
Overview
The Airbed::Resources module is designed to be mixed into your Controllers module.
Getting Started
To let your controllers be restful
-
require 'rubygems'
-
require 'airbed'
-
Mixin airbed:
module YourApp::Controllers; include Airbed::Resources; end
Now, instead of deriving your controller from R
, derive it from Resource
:
module YourApp::Controllers
class YourModels < Resource YourModel
end
end
You can override the various default implementations of the restful actions below by just overriding the methods.
Defined Under Namespace
Modules: ClassMethods Classes: Resty
Class Method Summary collapse
-
.included(base) ⇒ Object
nodoc
.
Class Method Details
.included(base) ⇒ Object
nodoc
26 27 28 |
# File 'lib/airbed.rb', line 26 def self.included(base) # +nodoc+ base.send :extend, ClassMethods end |