Module: RubyCms::Admin::DashboardHelper
- Defined in:
- app/helpers/ruby_cms/admin/dashboard_helper.rb
Instance Method Summary collapse
-
#render_dashboard_block(block) ⇒ Object
Renders a dashboard block from the registry (+ :locals from the controller).
Instance Method Details
#render_dashboard_block(block) ⇒ Object
Renders a dashboard block from the registry (+ :locals from the controller).
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/ruby_cms/admin/dashboard_helper.rb', line 7 def render_dashboard_block(block) locals = block[:locals] locals = {} if locals.nil? if block[:partial].present? render partial: block[:partial], locals: locals elsif block[:render].respond_to?(:call) block[:render].call(self, locals) else "" end end |