module Apotomo::Rails::ControllerMethods::ClassMethods

Public Instance Methods

has_widgets(&block) click to toggle source

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
# File lib/apotomo/rails/controller_methods.rb, line 43
def has_widgets(&block)
  has_widgets_blocks << block
end