Sha256: db4f5e440fbb558efcd57034dd9b09d725391ea60d53727776221aea28a576db

Contents?: true

Size: 486 Bytes

Versions: 1

Compression:

Stored size: 486 Bytes

Contents

module Mathjax
  module Rails
    module ViewHelpers
      def mathjax_tag(opt={})
        if false==opt[:config]
          additional = ''
        else
          opt[:config] = 'TeX-AMS_HTML-full.js' if !opt[:config]
          additional = "?config=#{opt[:config]}"
        end
        "<script src=\"#{mathjax_path(:uri=>'MathJax.js')}#{additional}\" type=\"text/javascript\"></script>".html_safe
      end
    end
  end
end
ActionView::Base.send :include, Mathjax::Rails::ViewHelpers

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mathjax_rails-0.0.1 lib/mathjax_rails/helper.rb