lazy_high_charts 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,7 @@ LazyHighCharts
|
|
2
2
|
=======
|
3
3
|
LazyHighCharts is Rails 2.x/3.x Gem for displaying Highcharts graphs.
|
4
4
|
|
5
|
+
Now Support Rails 3.1 rc4 stable branch,Happy useful
|
5
6
|
=======
|
6
7
|
### plugin support for rails 2.3.5 and rails 3
|
7
8
|
|
@@ -29,6 +30,12 @@ Usage
|
|
29
30
|
In your Gemfile, add this line:
|
30
31
|
gem 'lazy_high_charts'
|
31
32
|
|
33
|
+
For Rails 3.1
|
34
|
+
In your Gemfile, add this line:
|
35
|
+
gem 'lazy_high_charts', '~> 1.1.5'
|
36
|
+
then execuate command:
|
37
|
+
Rails g lazy_high_charts:install
|
38
|
+
|
32
39
|
Usage in Controller:
|
33
40
|
|
34
41
|
@h = LazyHighCharts::HighChart.new('graph') do |f|
|
@@ -4,8 +4,12 @@ module LazyHighCharts
|
|
4
4
|
|
5
5
|
def install_highcharts(opts = nil)
|
6
6
|
say_status("installing", "Highcharts javascript (github STOCK branch)", :green)
|
7
|
-
|
8
|
-
|
7
|
+
if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR >= 1
|
8
|
+
get "http://highcharts.com/js/highstock.js","app/assets/javascripts/highcharts.js"
|
9
|
+
else
|
10
|
+
get "https://raw.github.com/highslide-software/highcharts.com/stock/js/highcharts.src.js","public/javascripts/highcharts.js"
|
11
|
+
end
|
12
|
+
rescue OpenURI::HTTPError
|
9
13
|
say_status("warning", "could not find Highcharts javascript file", :yellow)
|
10
14
|
end
|
11
15
|
|