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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -