Module: CoffeeBeans::ViewHelpers

Defined in:
lib/coffeebeans.rb

Instance Method Summary collapse

Instance Method Details

#coffee_script(&block) ⇒ Object



23
24
25
# File 'lib/coffeebeans.rb', line 23

def coffee_script(&block)
  ::CoffeeScript.compile(capture(&block)).html_safe
end

#coffee_script_tag(&block) ⇒ Object



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

def coffee_script_tag(&block)
  (:script, coffee_script(&block), :type => 'text/javascript')
end