Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序标题中有一个图像,但我想将该图像作为链接,并且我想以 Rails 方式执行此操作,因为我知道如何使用 html/php 执行此操作。
有这样的选择吗?
谢谢。
您可以简单地使用这样的代码<%= link_to (image_tag "image_name.jpg", :title => 'Image_Title'), :action => :action_name %>
<%= link_to (image_tag "image_name.jpg", :title => 'Image_Title'), :action => :action_name %>