def camelize(term, uppercase_first_letter = true)
      string = term.to_s
      string = if uppercase_first_letter
        string.sub(/^[a-z\d]*/, &:capitalize)
      else
        string.sub(/^((?=\b|[A-Z_])|\w)/, &:downcase)
               end
      string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{Regexp.last_match(1)}#{Regexp.last_match(2).capitalize}" }
      string.gsub!('/'.freeze, '::'.freeze)
      string
    end
def camelize(term, uppercase_first_letter = true)
      string = term.to_s
      string = if uppercase_first_letter
        string.sub(/^[a-z\d]*/, &:capitalize)
      else
        string.sub(/^((?=\b|[A-Z_])|\w)/, &:downcase)
               end
      string.gsub!(/(?:_|(\/))([a-z\d]*)/i) { "#{Regexp.last_match(1)}#{Regexp.last_match(2).capitalize}" }
      string.gsub!('/'.freeze, '::'.freeze)
      string
    end
This method was taken from ActiveSupport::Inflector to avoid having
 a dependency on ActiveSupport in this project.
 http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-constantize