Module: Rbjs::Helpers

Defined in:
lib/rbjs/sinatra.rb

Instance Method Summary collapse

Instance Method Details

#rbjs(content = nil, &block) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/rbjs/sinatra.rb', line 3

def rbjs content=nil, &block
  content_type 'application/javascript'
  if block_given?
    render :rbjs, '', &block
  else
    render :rbjs, content
  end
end