Sha256: f2440d58aea4395859f21240f81e9ae688706cbc270100e2106320cb05c1a732
Contents?: true
Size: 752 Bytes
Versions: 6
Compression:
Stored size: 752 Bytes
Contents
module Fuel module ApplicationHelper def markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :space_after_headers => true) raw markdown.render(text) end # Can search for named routes directly in the main app, omitting # the "main_app." prefix def method_missing method, *args, &block if main_app_url_helper?(method) main_app.send(method, *args) else super end end def respond_to?(method) main_app_url_helper?(method) or super end private def main_app_url_helper?(method) (method.to_s.end_with?('_path') or method.to_s.end_with?('_url')) and main_app.respond_to?(method) end end end
Version data entries
6 entries across 6 versions & 1 rubygems