Permalink
Browse files

Update match to get in routes and docs

  • Loading branch information...
mjankowski committed Mar 2, 2013
1 parent 087c1dd commit a1adc0dc8b7ba86efa48539bf929acbd5c8c4caa
Showing with 5 additions and 5 deletions.
  1. +3 −3 README.md
  2. +2 −2 spec/dummy/config/routes.rb
View
@@ -51,7 +51,7 @@ By default, the static page routes will be like /pages/:id (where :id is the vie
If you want to route to a static page in another location (for example, a homepage), do this:
- match 'pages/home' => 'high_voltage/pages#show', :id => 'home'
+ get 'pages/home' => 'high_voltage/pages#show', :id => 'home'
In that case, you'd need an app/views/pages/home.html.erb file.
@@ -65,7 +65,7 @@ route generated by High Voltage itself.
For example, this will work for top-level routes (we will
get a named route called `static_path` which does not conflict with the generated `page_path` method):
- match '/:id' => 'high_voltage/pages#show', :as => :static, :via => :get
+ get '/:id' => 'high_voltage/pages#show', :as => :static, :via => :get
#### Specifying a root path
@@ -129,7 +129,7 @@ Create a PagesController of your own:
Override the default route:
# in config/routes.rb
- match "/pages/*id" => 'pages#show', :as => :page, :format => false
+ get "/pages/*id" => 'pages#show', :as => :page, :format => false
# if routing the root path, update for your controller
root :to => 'pages#show', :id => 'home'
@@ -1,4 +1,4 @@
Dummy::Application.routes.draw do
- match "/subclassed_pages/*id" => 'subclassed_pages#show', :format => false
- match "/alternative_finder/*id" => 'alternative_finder#show', :format => false
+ get "/subclassed_pages/*id" => 'subclassed_pages#show', :format => false
+ get "/alternative_finder/*id" => 'alternative_finder#show', :format => false
end

0 comments on commit a1adc0d

Please sign in to comment.