From 40cf0775d20d35552fc9a065c2273a33bd587aa3 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Wed, 21 Nov 2012 13:18:24 +0000 Subject: [PATCH] Refactor internals of app.rb --- lib/app.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/app.rb b/lib/app.rb index 6122b9f..85574c0 100644 --- a/lib/app.rb +++ b/lib/app.rb @@ -7,7 +7,7 @@ set :root, File.expand_path('..', File.dirname(__FILE__)) helpers do def base - params[:base] || 'EUR' + params[:base] || Snapshot::DEFAULT_BASE end end @@ -22,9 +22,9 @@ get '/latest' do .to_hash end -get '/:date' do |date| +get '/:date' do jsonp Snapshot - .new(date) + .new(params[:date]) .with_base(base) .to_hash end