Module: ActionDispatch::Routing::Mapper::HttpHelpers

Included in:
ActionDispatch::Routing::Mapper
Defined in:
actionpack/lib/action_dispatch/routing/mapper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) delete(*args, &block)

Define a route that only recognizes HTTP DELETE. For supported arguments, see match

delete 'broccoli', to: 'food#broccoli'


609
610
611
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 609

def delete(*args, &block)
  map_method(:delete, args, &block)
end

- (Object) get(*args, &block)

Define a route that only recognizes HTTP GET. For supported arguments, see match

get 'bacon', to: 'food#bacon'


577
578
579
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 577

def get(*args, &block)
  map_method(:get, args, &block)
end

- (Object) patch(*args, &block)

Define a route that only recognizes HTTP PATCH. For supported arguments, see match

patch 'bacon', to: 'food#bacon'


593
594
595
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 593

def patch(*args, &block)
  map_method(:patch, args, &block)
end

- (Object) post(*args, &block)

Define a route that only recognizes HTTP POST. For supported arguments, see match

post 'bacon', to: 'food#bacon'


585
586
587
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 585

def post(*args, &block)
  map_method(:post, args, &block)
end

- (Object) put(*args, &block)

Define a route that only recognizes HTTP PUT. For supported arguments, see match

put 'bacon', to: 'food#bacon'


601
602
603
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 601

def put(*args, &block)
  map_method(:put, args, &block)
end