# Match default verb

**URL:** <https://www.ruby-forum.com/t/match-default-verb/194059>\
**Category:** Rails\
**Created:** [August 29, 2010, 3:41pm UTC](https://www.ruby-forum.com/t/match-default-verb/194059 "2010-08-29T15:41:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/58f4c7/32.png) [@mike](https://www.ruby-forum.com/u/mike)\
**Post date:** [August 29, 2010, 3:41pm UTC](https://www.ruby-forum.com/t/match-default-verb/194059/1 "2010-08-29T15:41:01Z")

</div>

The default verb for match is :any. This means for:

match ‘dog/bark(/:num)’ =\> ‘dogs#bark’ # get 3 barks  
match ‘dog/eat’ =\> ‘dogs#eat’ # post breakfast

someone could post on dog/bark with :louder or get on dog/eat  
with :breakfast. This is annoying and messy, and definitely not  
RESTful.

In moving to Rails 3, I’m finding it better to use the verb instead of  
using match with :via =\> :verb:

get ‘dog/bark’ =\> ‘dogs#bark’  
post ‘dog/eat’ =\> ‘dogs#eat’

There is a lot of emphasis on match in the routing comments. Wouldn’t  
it be better to either default to :via =\> :get for match or recommend  
verb methods over the match method?

I want to make sure I understand the differences too.

Thanks in advance,  
Mike
