Sha256: 7c252cd773d6e68ac16ffb16852890ddee951463fd454cd92964adaa88c3cd7f

Contents?: true

Size: 768 Bytes

Versions: 6

Compression:

Stored size: 768 Bytes

Contents

require 'padrino-helpers'

module Massimo
  module Helpers
    include Padrino::Helpers::OutputHelpers
    include Padrino::Helpers::TagHelpers
    include Padrino::Helpers::AssetTagHelpers
    include Padrino::Helpers::FormHelpers
    include Padrino::Helpers::FormatHelpers
    include Padrino::Helpers::NumberHelpers
    include Padrino::Helpers::TranslationHelpers
    
    # Returns an instance of the Site
    def site
      Massimo.site
    end
    
    # Returns the current Site configuration
    def config
      Massimo.config
    end
    
    # Renders a view with the given locals. Kind of like `render :partial` in Rails
    def render(view_name, locals = {})
      view = Massimo::View.find(view_name)
      view && view.render(locals)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
massimo-0.10.3 lib/massimo/helpers.rb
massimo-0.10.2 lib/massimo/helpers.rb
massimo-0.10.1 lib/massimo/helpers.rb
massimo-0.10.0 lib/massimo/helpers.rb
massimo-0.9.0 lib/massimo/helpers.rb
massimo-0.8.5 lib/massimo/helpers.rb