Ruby on rails 3 link_to controller and action

后端 未结 3 450
长情又很酷
长情又很酷 2020-12-30 19:24

I know this is probably a pretty simple concept. I am trying to create a link to a controller and action. For example I have a link in my layout file to update a record when

3条回答
  •  天涯浪人
    2020-12-30 19:44

    link_to "Label", :controller => :my_controller, :action => :index
    

    See url_for.

提交回复
热议问题