`

rails 截取较长字符串前10字符其余用。。。代替

    博客分类:
  • RUBY
阅读更多
<%=link_to "#{truncate(contest_entry.title.gsub(/<[^>]*>/, ""), 10)}" ,{:controller=>"contests",:action => 'view_entry', :id => contest_entry.id},:target=>"_blank" %>


truncate(p.name.gsub(/<[^>]*>/, ""), 10)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics