5
6
7
8
9
10
11
12
13
14
|
# File 'lib/generators/lazy_high_charts/install/install_generator.rb', line 5
def install_highcharts(opts = nil)
say_status("installing", "Highcharts javascript(code.highcharts.com/stock version)", :green)
if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR >= 1
get "http://code.highcharts.com/stock/highstock.js", "vendor/assets/javascripts/highcharts.js"
else
get "http://code.highcharts.com/stock/highstock.js","public/javascripts/highcharts.js"
end
rescue OpenURI::HTTPError
say_status("warning", "could not find Highcharts javascript file", :yellow)
end
|