local_javascriptタグ

  def local_javascript(&block)
    concat(javascript_tag(<<-EOS), block.binding)
      (function() {
        #{capture(&block)};
      })();
    EOS
  end