fixtures/sinatra_test/app.rb in rabl-0.7.10 vs fixtures/sinatra_test/app.rb in rabl-0.8.0

- old
+ new

@@ -39,6 +39,14 @@ get "/users/:id" do @user = User.find(params[:id]) render :rabl, :"users/show.json", :format => "json" end +end + +# Patch times to return as iso8601 +class Time + alias_method :old_to_s, :to_s + def to_s(format=nil) + format ? old_to_s(format) : iso8601 + end end \ No newline at end of file