- model :user
-
- def day_votes
-
- @election = Election.find(params[:id])
- line = Gruff::Line.new
- line.title = "Voters Per Day"
- line.font = File.expand_path('/usr/X11R6/lib/X11/fonts/TTF/Vera.ttf', RAILS_ROOT)
- line.data("#{@election.name}", voter_days["voters_per_day"] )
- line.labels = voter_days["days_hash"]
- line.x_axis_label = "Date"
- line.y_axis_label = "Number of Votes"
- line.minimum_value = 0.0
- line.draw
- send_data(line.to_blob,
- :disposition => 'inline',
- :type => 'image/png',
- :filename => "dayvotes#{@poll.id}.png")
+ require_dependency "user"
+
+ include Sitealizer
+ before_filter :add_stylesheets
+ #before_filter :use_sitealizer
+
+ def initialize
+ @stylesheets = []
+
+
+ # this is defined is a sketchy way in the sitealizer mixin
+ # initalize. since i'm overloading that, i'm calling it here
+ $visits = [] unless $visits