Module: ApiCanon::Routes

Defined in:
lib/api_canon/routes.rb

Class Method Summary collapse

Class Method Details

.draw(map, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/api_canon/routes.rb', line 3

def self.draw(map, options={})
  route_opts = {:as => 'api_canon_test',
    :controller => 'api_canon/api_canon', :action => 'test', :via => [:post]
  }.merge options
  if Rails.version.starts_with?('2')
    map.api_canon_test 'api_canon/test', route_opts
  else
    map.match 'api_canon/test', route_opts
  end
end