在您的应用程序辅助方法中,您可以重写 link_to 方法并替换为您自己的方法。def link_to(name, options = {}, html_options = {}) html_options.merge!(:rel => :nofollow) super(name, options, html_options) end
merge_nicely!
代替:https://gist.github.com/joshuapinter/78a5545d713ab9d55883 - Joshua Pinter