Module: Apotomo::Rails::ControllerMethods::ClassMethods
- Defined in:
- lib/apotomo/rails/controller_methods.rb
Instance Method Summary collapse
-
#has_widgets(&block) ⇒ Object
Yields the root widget to setup your widgets for a controller.
Instance Method Details
#has_widgets(&block) ⇒ Object
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
43 44 45 |
# File 'lib/apotomo/rails/controller_methods.rb', line 43 def (&block) << block end |