我在 Rails 3 中有以下助手:
def other_contact_info(shop = false)
shop = shop ? shop : @shop
email = mail_to(shop.email, "Email", :encode => "javascript") if shop.web.present?
web = link_to(shop.web, truncate(shop.web), :target => "_blank") if shop.web.present?
raw [shop.contact, email, web].select(&:present?).join(" · ")
end
truncate
什么都不做。我怎样才能解决这个问题?
谢谢。