app/controllers/javascript_controller.rb in test_server-0.1.2 vs app/controllers/javascript_controller.rb in test_server-0.2.0
- old
+ new
@@ -20,15 +20,15 @@
get '/xhr/url/?' do
param :count, Integer, default: 10
param :timeout, Integer, default: 10
param :url, String
- param :repeat, Boolean, default: false
+ param :repeat, String, default: 'false'
@count = params[:count]
@url = params[:url]
@timeout = params[:timeout]
- @repeat = params[:repeat]
+ @repeat = %w{ on yes true t }.include?(params[:repeat])
haml :'xhr/show', layout: :application
end
end
end