#module ApplicationHelper
module Duck
module Entities
def left_arrow
"«"
end
def right_arrow
"»"
end
end
module Helpers
include Entities
def xhtml_doctype
''
end
def html_with_namespace
''
end
def content_type_meta_tag
''
end
# clears any floating elements
def clear
'
'
end
def devel_mode?
RAILS_ENV == 'development'
end
def action_name
@controller.action_name
end
def controller_name
@controller.controller_name
end
# spits some inline js into the template, works like form_for, i.e., don't use <%= %>
# but use <% %> instead. example:
#
# <% inline_js do %>
# alert('Oh no!')
# <% end %>
#
# results in this template output:
#
#
def inline_js(&blk)
js = capture(&blk)
concat(javascript_tag(js), blk.binding)
end
def textilize(text)
RedCloth.new(text, [:no_span_caps, :hard_breaks]).to_html
end
def tx(text)
textilize text
end
def tx_no_p(text)
textilize_without_paragraph text
end
# use to make development notes (formatted in textile) that only show up in development mode
def dev_note(text = '', &blk)
if RAILS_ENV == 'development'
if block_given?
instruction = capture(&blk)
concat("