Routing Error – No Route Matches [Post] “orders/new”

I ran into a fairly common routing error this morning, thankfully these are fairly easy to fix – usually!

Routing Error
No route matches [POST] “/orders/new”

Simply add the following the route to your routes.rb file:

siteconfigroutes.rb

#Orders
controller :orders do
post ‘orders/new’ => ‘orders#new’
end

You may also have to restart WEBrick for this new route to take affect. Good Luck!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s