How can i call the private method in controller by link_to in ruby on rails? -
i have method in controller called scenario_population
def scenario_population ..... end i have link_to method in view
<%= name_id %> #without form <%= link_to 'run', # %> how can call controller method link_to button here? don't have created routes private method in controller.
please suggest me this? thanks
since 'link_to' create link element, need url put link's href. you're looking impossible. you'll have create public route access controller method.
Comments
Post a Comment