I am trying to write two links for reject& approve actions, but, I don't know how to write the correct route,
my route.rb
put 'approve_class_room/:id(.:format)', :to => 'class_room_member_ships#approve'
put 'reject_class_room/:id(.:format)', :to => 'class_room_member_ships#reject'
but, in rake routes, I get:
PUT /approve_class_room/:id(.:format) class_room_member_ships#approve
PUT /reject_class_room/:id(.:format) class_room_member_ships#reject
so, what would be the correct link_to path ?
my link is
= link_to 'approve', approve_class_room_path
it wont' work, I get:
undefined local variable or method `approve_class_room_path'
p.s: I am trying to have the link_to works using AJAX, to do the approve in the same page, AM I on the right way ? what would be the link_to path ?
Any idea please ?