lib/jets/router.rb in jets-0.10.3 vs lib/jets/router.rb in jets-0.10.4
- old
+ new
@@ -28,17 +28,17 @@
put "#{name}/:id", to: "#{name}#update"
delete "#{name}/:id", to: "#{name}#delete"
end
def api_mode?
- if Jets.config.api_generator
+ unless Jets.config.key?(:mode)
puts <<~EOL.colorize(:yellow)
DEPRECATED: Jets.config.api_generator
Instead, please update your config/application.rb to use:
- Jets.config.api_mode
+ Jets.config.mode = 'api'
EOL
end
- api_mode = Jets.config.api_mode || Jets.config.api_generator
+ api_mode = Jets.config.mode == 'api' || Jets.config.api_mode || Jets.config.api_generator
api_mode
end
def create_route(options)
@routes << Route.new(options)