我正在努力解决有关图像的正确设置参数的问题,即链接。混凝土,
<%= link_to (image_tag 'img name',
:class => 'css'),
({controller, action, parameter})%>
<%= link_to (image_tag 'img name',
:class => 'css'),
({controller, action, parameter},
{:remote => true})
%>
愿你认为这是一个非常低的问题,但我试图解决它超过半小时但仍然没有...所以我会感谢每一个帮助。
答案 0 :(得分:1)
你可以试试这个。 (未自我测试)
<%= link_to(image_tag('img name', :class => 'css'), url_for(:controller => 'controller_name', :action => 'action_name'), :remote => true) %>