class ActionDispatch::Routing::Mapper
Public Instance Methods
crud(*options, &block)
click to toggle source
# File lib/rails/routes.rb, line 4 def crud(*options, &block) options << { except: %w(new edit), defaults: { format: :json } } resources(*options, &block) end
mount_openapi_documentation()
click to toggle source
# File lib/rails/routes.rb, line 9 def mount_openapi_documentation get :openapi, to: 'openapi#index' end
mount_openapi_specification(options={})
click to toggle source
# File lib/rails/routes.rb, line 13 def mount_openapi_specification(options={}) name = options[:name] || :default get :spec, to: '/openapi#spec', defaults: { format: :json, name: name } end