Class: Zertico::Controller
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Zertico::Controller
- Defined in:
- lib/zertico/controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
-
#initialize ⇒ Controller
constructor
A new instance of Controller.
- #new ⇒ Object
- #options ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize ⇒ Controller
Returns a new instance of Controller.
5 6 7 8 9 10 11 12 |
# File 'lib/zertico/controller.rb', line 5 def initialize begin extend "::#{self.class.name.chomp('Controller').concat('Service')}".constantize rescue NameError extend Zertico::Service end super end |
Instance Method Details
#create ⇒ Object
30 31 32 |
# File 'lib/zertico/controller.rb', line 30 def create respond_with(generate, ) end |
#destroy ⇒ Object
38 39 40 |
# File 'lib/zertico/controller.rb', line 38 def destroy respond_with(delete, ) end |
#edit ⇒ Object
26 27 28 |
# File 'lib/zertico/controller.rb', line 26 def edit respond_with(find, ) end |
#index ⇒ Object
14 15 16 |
# File 'lib/zertico/controller.rb', line 14 def index respond_with(all, ) end |
#new ⇒ Object
18 19 20 |
# File 'lib/zertico/controller.rb', line 18 def new respond_with(build, ) end |
#options ⇒ Object
42 43 44 |
# File 'lib/zertico/controller.rb', line 42 def @options || {} end |
#show ⇒ Object
22 23 24 |
# File 'lib/zertico/controller.rb', line 22 def show respond_with(find, ) end |
#update ⇒ Object
34 35 36 |
# File 'lib/zertico/controller.rb', line 34 def update respond_with(modify, ) end |