module Tennpipes::Helpers

This component provides a variety of view helpers related to html markup generation. There are helpers for generating tags, forms, links, images, and more. Most of the basic methods should be very familiar to anyone who has used rails view helpers.

Public Class Methods

included(base) click to toggle source
# File lib/tennpipes-helper.rb, line 50
def included(base)
  base.send :include, Tennpipes::Helpers::OutputHelpers
  base.send :include, Tennpipes::Helpers::TagHelpers
  base.send :include, Tennpipes::Helpers::AssetTagHelpers
  base.send :include, Tennpipes::Helpers::FormHelpers
  base.send :include, Tennpipes::Helpers::FormatHelpers
  base.send :include, Tennpipes::Helpers::RenderHelpers
  base.send :include, Tennpipes::Helpers::NumberHelpers
  base.send :include, Tennpipes::Helpers::TranslationHelpers
end
registered(app) click to toggle source

Registers these helpers into your application:

Tennpipes::Helpers::OutputHelpers
Tennpipes::Helpers::TagHelpers
Tennpipes::Helpers::AssetTagHelpers
Tennpipes::Helpers::FormHelpers
Tennpipes::Helpers::FormatHelpers
Tennpipes::Helpers::RenderHelpers
Tennpipes::Helpers::NumberHelpers

@param [Sinatra::Application] app

The specified Tennpipes application.

@example Register the helper module

require 'tennpipes-helper'
class Tennpipes::Application
  register Tennpipes::Helpers
end
# File lib/tennpipes-helper.rb, line 44
def registered(app)
  app.register Tennpipes::Rendering
  app.set :default_builder, 'StandardFormBuilder'
  included(app)
end