Permalink
Browse files

add changelog

  • Loading branch information...
xiaods committed Sep 14, 2010
1 parent baed458 commit 6068b2c097df5d699a4dc6cd5964e2666b2319ba
Showing with 28 additions and 25 deletions.
  1. +4 −0 CHANGELOG
  2. +2 −12 README.md
  3. +1 −3 lib/high_charts_helper.rb
  4. +0 −10 spec/lazy_high_charts_spec.rb
  5. +21 −0 spec/spec_helper.rb
View
@@ -0,0 +1,4 @@
Sep 13,2010
* truely support rails 3.0(returning is deprecate function,use tap) deshi(xiaods@gmail.com)
View
@@ -1,20 +1,10 @@
LazyHighCharts
==============
## CHANGELOG
deshi(xiaods@gmail.com)
Sep 13,2010
* truely support rails 3.0(returning is deprecate function,use tap)
=======
- Test Environment
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01
rspec 2.0.0.beta.22
rails 3.0.0
Usage
rails 3.0.0Usage
=======
Usage in Controller:
@@ -1,5 +1,5 @@
# coding: utf-8
module HighChartsHelper
# ActiveSupport::JSON.unquote_hash_key_identifiers = false
def high_chart(placeholder, object , &block)
object.html_options.merge!({:id=>placeholder})
@@ -10,8 +10,6 @@ def high_chart(placeholder, object , &block)
def high_graph(placeholder, object, &block)
graph = javascript_tag <<-EOJS
jQuery(function() {
// 1. Define JSON options
var options = {
@@ -2,8 +2,6 @@
require 'spec_helper'
describe HighChartsHelper do
attr_accessor :_erbout
include HighChartsHelper
before(:each) do
@@ -12,20 +10,12 @@
@chart = HighChart.new(@placeholder)
@data = "data"
@options = "options"
self._erbout = ''
end
describe "high_chart_includes" do
it "should have a script tag" do
javascript_include_tag(:high_charts).should have_tag('script')
end
it "should have a script tag for ie" do
javascript_include_tag(:ie_high_charts).should have_tag('script')
end
end
describe "high_chart_helper" do
View
@@ -4,6 +4,27 @@
require 'action_pack'
require 'action_view'
require 'action_controller'
require 'action_mailer'
require File.expand_path(File.join(File.dirname(__FILE__), '../lib/high_chart'))
require File.expand_path(File.join(File.dirname(__FILE__), '../lib/high_charts_helper'))
module HighChartsHelper
include ActionPack
include ActionView::Context if defined?(ActionView::Context)
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::TagHelper
include ActionView::Helpers::TextHelper
include ActionView::Helpers::ActiveRecordHelper if defined?(ActionView::Helpers::ActiveRecordHelper)
include ActionView::Helpers::ActiveModelHelper if defined?(ActionView::Helpers::ActiveModelHelper)
include ActionView::Helpers::DateHelper
include ActionView::Helpers::CaptureHelper
include ActionView::Helpers::AssetTagHelper
include ActiveSupport
end

0 comments on commit 6068b2c

Please sign in to comment.