camelize と underscore
キャメルケースへ
スネークケースへ> "camel_case". camelize=> "CamelCase"
> "CamelCase".underscore=> "camel_case"
スネークケースへ> "camel_case". camelize=> "CamelCase"
> "CamelCase".underscore=> "camel_case"
$ bundle exec rake db:schema:load
$ rake db:schema:dump
gem 'lazy_high_charts
//= require highcharts/highcharts
//= require highcharts/highcharts-more
//= require highcharts/highstock
//= require_tree .
def sellView
@categories = ["apple", "orange", "banana", "strawberry", "melon", "lemon", "peach"]
@data = [40, 10, 20, 50, 30, 10, 60]
@h = LazyHighCharts::HighChart.new("graph") do |f|
f.chart(:type => "bar")
f.title(:text => "Sample bar")
f.xAxis(:categories => @categories)
f.series(:name => "Fruits",
:data => @data)
end
end
<%= high_chart("sample", @h) %>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?sensor=false">
</script>