Module: Massimo::Helpers

Includes:
Padrino::Helpers::AssetTagHelpers, Padrino::Helpers::FormHelpers, Padrino::Helpers::FormatHelpers, Padrino::Helpers::NumberHelpers, Padrino::Helpers::OutputHelpers, Padrino::Helpers::TagHelpers, Padrino::Helpers::TranslationHelpers
Defined in:
lib/massimo/helpers.rb

Instance Method Summary collapse

Instance Method Details

#configObject

Returns the current Site configuration



19
20
21
# File 'lib/massimo/helpers.rb', line 19

def config
  Massimo.config
end

#render(view_name, locals = {}) ⇒ Object

Renders a view with the given locals. Kind of like ‘render :partial` in Rails



24
25
26
27
# File 'lib/massimo/helpers.rb', line 24

def render(view_name, locals = {})
  view = Massimo::View.find(view_name)
  view && view.render(locals)
end

#siteObject

Returns an instance of the Site



14
15
16
# File 'lib/massimo/helpers.rb', line 14

def site
  Massimo.site
end