Sha256: afa20e386d613a639106588d64ba4a42420199a147e8edcb8282adf4a563fb71
Contents?: true
Size: 673 Bytes
Versions: 1
Compression:
Stored size: 673 Bytes
Contents
config.after_initialize do module ActionControlller class Base def render(*args) if args.length == 1 && args[0].kind_of?(Hash) hash = args.first case hash[:rgviz] when nil then super else model = hash[:rgviz] query = params[:tq] executor = Rgviz::Executor.new model, Rgviz::Parser.new(query).parse table = executor.execute super :text => "google.visualization.Query.setResponse({version:'0.6',reqId:'0',status:'ok',sig:'5982206968295329967',table:#{table.to_json}});" end else super end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rgviz-rails-0.3 | rails/init.rb |