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

Version Path
social_stream-base-0.7.11 app/helpers/subjects_helper.rb
social_stream-base-0.7.10 app/helpers/subjects_helper.rb
social_stream-base-0.7.9 app/helpers/subjects_helper.rb
social_stream-base-0.7.8 app/helpers/subjects_helper.rb
social_stream-base-0.7.7 app/helpers/subjects_helper.rb
social_stream-base-0.7.6 app/helpers/subjects_helper.rb
social_stream-base-0.7.5 app/helpers/subjects_helper.rb
social_stream-base-0.7.4 app/helpers/subjects_helper.rb
social_stream-base-0.7.3 app/helpers/subjects_helper.rb
social_stream-base-0.7.2 app/helpers/subjects_helper.rb
social_stream-base-0.7.1 app/helpers/subjects_helper.rb
social_stream-base-0.7.0 app/helpers/subjects_helper.rb
social_stream-base-0.6.8 app/helpers/subjects_helper.rb
social_stream-base-0.6.6 app/helpers/subjects_helper.rb
social_stream-base-0.6.5 app/helpers/subjects_helper.rb