I am testing some examples in Rails 3, and somehow routing table ended up with wrong route.
This is the route that rails knows about
course_ad_student POST /students/:id/course_ad(.:format) students#course_ad
but in my Students controller method is this
def course_add
#code
end
So the question is, how to remove that ‘course_ad_student’ route and place ‘course_add_student’ instead?
Look at
config/routes.rb. Find the line that’s something likepost 'course_ad'and change it appropriately.