Sha256: 2a93a7aa0039fa63f63a8e9737dd5aaad5291bd5c965b10ada2336a0891b0ce2
Contents?: true
Size: 371 Bytes
Versions: 15
Compression:
Stored size: 371 Bytes
Contents
module SubjectsHelper NAME_MAX_LENGHT = 30 # Return a link to this subject with the name def link_name(subject, options = {}) link_to subject.name, subject, options end # Return the truncated name def truncate_name(name, options={}) options = {:length => NAME_MAX_LENGHT, :separator => ' '}.merge options truncate(name,options) end end
Version data entries
15 entries across 15 versions & 1 rubygems