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 +5 -0
- data/lib/mathjax/rails/controllers.rb +5 -4
- data/lib/mathjax/rails/version.rb +1 -1
- metadata +1 -1
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
|
-
|
11
|
-
|
12
|
-
|
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
|