lib/jets/router.rb in jets-1.6.1 vs lib/jets/router.rb in jets-1.6.2
- old
+ new
@@ -82,11 +82,13 @@
api_mode = Jets.config.mode == 'api' || Jets.config.api_mode || Jets.config.api_generator
api_mode
end
# root "posts#index"
- def root(to)
- @routes << Route.new(path: '', to: to, method: :get, root: true)
+ def root(to, options={})
+ default = {path: '', to: to, method: :get, root: true}
+ options = default.merge(options)
+ @routes << Route.new(options)
end
# Useful for creating API Gateway Resources
def all_paths
results = []