Permalink
Browse files

Updating demo to show all tag helpers

  • Loading branch information...
1 parent b3a8a73 commit 65e6f17f0f7b29e1bb12df2b04c9b815736defa8 @mk mk committed May 26, 2010
@@ -1,3 +1,9 @@
<h1>reportable demo</h1>
+<h2>using g.Raphael (recommended)</h2>
+<%= raphael_report_tag(User.registrations_report).html_safe %>
-<%= report_tag(User.registrations_report) %>
+<h2>using jquery flot</h2>
+<%= flot_report_tag(User.registrations_report, :dom_id => "user_registrations_flot").html_safe %>
+
+<h2>using the google drawing api</h2>
+<%= google_report_tag(User.registrations_report) %>
@@ -3,7 +3,9 @@
<head>
<title>ReportableSample</title>
<%= stylesheet_link_tag :all %>
- <%= javascript_include_tag :defaults %>
+ <%= javascript_include_tag 'raphael.min', 'g.raphael.min', 'g.line.min' %>
+ <%= javascript_include_tag 'jquery-1.4.2.min' %>
+ <%= javascript_include_tag 'excanvas.min', 'jquery.flot.min' %>
<%= csrf_meta_tag %>
</head>
<body>
@@ -0,0 +1,40 @@
+class CreateReportableCache < ActiveRecord::Migration
+
+ def self.up
+ create_table :reportable_cache, :force => true do |t|
+ t.string :model_name, :null => false
+ t.string :report_name, :null => false
+ t.string :grouping, :null => false
+ t.string :aggregation, :null => false
+ t.string :conditions, :null => false
+ t.float :value, :null => false, :default => 0
+ t.datetime :reporting_period, :null => false
+
+ t.timestamps
+ end
+
+ add_index :reportable_cache, [
+ :model_name,
+ :report_name,
+ :grouping,
+ :aggregation,
+ :conditions
+ ], :name => :name_model_grouping_agregation
+ add_index :reportable_cache, [
+ :model_name,
+ :report_name,
+ :grouping,
+ :aggregation,
+ :conditions,
+ :reporting_period
+ ], :unique => true, :name => :name_model_grouping_aggregation_period
+ end
+
+ def self.down
+ remove_index :reportable_cache, :name => :name_model_grouping_agregation
+ remove_index :reportable_cache, :name => :name_model_grouping_aggregation_period
+
+ drop_table :reportable_cache
+ end
+
+end

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 65e6f17

Please sign in to comment.