【发布时间】:2013-04-18 07:51:14
【问题描述】:
<td>
<%=link_to image_tag(phone.image, :class => 'list_image'), :controller => 'phones_feature_controller', :action => 'index', :id => phone.id %>
</td>
我想要一个指向另一个控制器的图像链接。
这个链接在我的索引页中,它的控制器是phone。我有另一个控制器phones_feature。我想要一个指向phones_feature的索引页的链接
我的手机功能控制器:
def index
@phones=Phone.find(params[:id])
respond_to do |format|
format.html # index.html.erb
format.json { render json: @phones }
end
end
【问题讨论】:
标签: ruby-on-rails ruby hyperlink controller