Tagged with helpers

Thu May 24, 2018 8:24 AM
activity
Truncate and Link to excerpt content helper
Mon May 21, 2018 2:58 PM
guide
For use with trusted/cleaned data. Add to application.rb def truncate_and_link(text,options ={}) length = options[:length] return text if length.blank? url = options[:url] || '#' output = raw text.truncate_words(length) output += link_to('more', url) if text.size > length output.html_safe end Adapted from: http://itiansrock.blogspot.com/2013/01/truncate-and-link-text-helper-in-rails.htmlmore
Mon Apr 16, 2018 11:27 PM
activity
ensure accurate dynamic SEO