how render pages of different controllers in ruby on rails of radio button change event..
in scenario there different types of templates encounter render page according radio button selection..
i write 1 action method method in controller handle these situation problem follows
using jquery can't redirect action method of controller tried follows
in controller
class schedularcontroller < applicationcontroller def index # ... redirect_to :controller=>'encounter', :action => 'index' end end
in route
'info' => 'schedular#index' , :as=>'info'
and javascript follows
$(document).on("change", 'input[name=encounter]', function() { var id=$(this).val(); alert(id); $.ajax({ url: "info", data: { param_one: $(this).val() } }); });
in above encounter name of radio button
but can't redirect action method..
Comments
Post a Comment