Module: Apotomo::Rails::ControllerMethods::ClassMethods
- Defined in:
- lib/apotomo/rails/controller_methods.rb
Instance Method Summary (collapse)
-
- (Object) has_widgets(&block)
Yields the root widget to setup your widgets for a controller.
Instance Method Details
- (Object) has_widgets(&block)
Yields the root widget to setup your widgets for a controller. The block is executed in controller instance context, so you may use instance methods and variables of the controller.
Example:
class PostsController < ApplicationController
has_widgets do |root|
root << widget(:comments, :user => current_user)
end
41 42 43 |
# File 'lib/apotomo/rails/controller_methods.rb', line 41 def (&block) << block end |