ApplicationHelper

encoding: UTF-8

Public Instance Methods

camelCaseString(phrase) click to toggle source
    # File app/helpers/application_helper.rb, line 26
26:   def camelCaseString phrase

27:   phrase.gsub!(/^[a-z]|\s+[a-z]/) { |a| a.upcase }

28:   return phrase

29: end
get_album_info(album, artist) click to toggle source
    # File app/helpers/application_helper.rb, line 17
17:   def get_album_info album, artist

18:     @result = LastFM::Album.getInfo(album, artist)

19:     @result.album

20:   end
trimString(str, length) click to toggle source
    # File app/helpers/application_helper.rb, line 22
22:   def trimString str, length

23:     truncate str, :length => length.to_i, :omission => "…"

24:   end
validate_img_url(image, type, size) click to toggle source
    # File app/helpers/application_helper.rb, line 4
 4:   def validate_img_url image, type, size

 5:     @attr = (type=="gallery") ? "name" : "size"

 6:     image.each do |img|

 7:       if img[@attr] == size.to_s

 8:         if img["#text"].blank?

 9:           return "/images/placeholder/#{type.to_s}.png"

10:         end

11:         return img["#text"]

12:       end

13:     end

14:         

15:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.