0

I have controller Pages which have methods like home , aboutus , joinus ,contactus and mad.

joinus also has a form given below.

JOIN US

Name

Email

Address

Number

SUBMIT

when I click on submit, Routing error is coming

No route matches [POST] "/pages/joinus"

Rails.root: C:/NEW/charityapp

Application Trace | Framework Trace | Full Trace Routes

Routes match in priority from top to bottom

Helper HTTP Verb Path Controller#Action Path / Url
pages_home_path GET /pages/home(.:format) pages#home root_path GET / pages#home pages_aboutus_path GET /pages/aboutus(.:format) pages#aboutus pages_joinus_path GET /pages/joinus(.:format) pages#joinus pages_contactus_path GET /pages/contactus(.:format) pages#contactus pages_mad_path GET /pages/mad(.:format) pages#mad

Nitin Rajan
  • 309
  • 2
  • 18

1 Answers1

0

If you check what routes you have, you will see

GET /pages/joinus(.:format) pages#joinus pages_contactus_path

Forms trigger POST verb not GET, you need to change this to

POST /pages/joinus(.:format) pages#joinus pages_contactus_path

Nermin
  • 6,118
  • 13
  • 23
  • Actually i had four buttons about us , join us , contact us and mad..so when clicking on the join us button it should open pages_join_us path.So I cannot change GET /pages/joinus(.:format) pages#joinus pages_joinusus_path...pls help – Nitin Rajan Mar 31 '15 at 09:26