Created
January 12, 2010 18:06
-
-
Save deadprogram/275414 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GET /user/1/time_spent | |
def time_spent | |
@time_spent = @user.time_spent | |
respond_to do |format| | |
format.xml { render :xml => @time_spent.to_xml } | |
format.json { render :json => @time_spent.to_json } | |
format.png { send_data(Spark.plot( @time_spent, :has_min => true, :has_max => true, 'has_last' => 'true', 'height' => '30', :step => 10 ), :type => 'image/png', | |
:filename => "#{@user.login}_time_spent.png", | |
:disposition => 'inline') } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment