mathjax-rails 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -95,3 +95,8 @@ It won't pollute your rails project more than the above three.
95
95
  If you have a fast CDN service at hand, you don't need this gem.
96
96
 
97
97
  Putting your MathJax at CDN is probably the best choice.
98
+
99
+ ## ChangeLog
100
+
101
+ * 2011.7.28
102
+ Version 0.0.2 used to fail on Heroku. Now the problem is fixed. I used to use `send_file` without content_type, which causes a failure when deployed to Heroku. Now in version 0.0.3 I use `render :type=>...,` with the appropriate content-type set and the problem is solved.
@@ -7,8 +7,9 @@ class MathjaxRailsController < ActionController::Base
7
7
 
8
8
  extname = File.extname(filename)[1..-1]
9
9
  mime_type = Mime::Type.lookup_by_extension(extname)
10
- content_type = mime_type.to_s unless mime_type.nil?
11
-
12
- render :file => File.expand_path(filepath,__FILE__), :content_type => content_type
10
+ options = Hash.new
11
+ options[:type] = mime_type.to_s unless mime_type.nil?
12
+ options[:disposition] = 'inline'
13
+ send_file File.expand_path(filepath,__FILE__), options
13
14
  end
14
- end
15
+ end
@@ -1,6 +1,6 @@
1
1
  module Mathjax
2
2
  module Rails
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  MATHJAXVERSION = '1.1a'
5
5
  DIRNAME = 'mathjax-MathJax-da8d488'
6
6
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mathjax-rails
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Minqi Pan