سؤال

This is the route in rails 2.3.14 , where i have a error to migrate a rails 4.0.3.

 #auth controller
map.app 'auth/app/:app_token', :controller => 'auth', :action => 'app'#, :via => :post

I didnt find complete documentation about route in rails 4 , if someone put a link I would appreciate.

i try with this, but something is wrong.

match 'auth/app/:app_token' :to =>'auth#app', via[:post]

thanks

هل كانت مفيدة؟

المحلول

This should work as you expect:

post 'auth/app/:app_token' => 'auth#app', :as => 'app'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top