lib/rails/generators/humdrum/layout/templates/helpers/display_helper.rb in humdrum-rails-0.1.1 vs lib/rails/generators/humdrum/layout/templates/helpers/display_helper.rb in humdrum-rails-0.1.2

- old
+ new

@@ -1,7 +1,7 @@ module DisplayHelper - + def scrap_word(text, char_count_limit, more_text = nil, more_link = nil,style='') # remove HTML tags text = text.to_s.gsub(/<\/?[^>]*>/, " ") # remove additional spaces text = text.to_s.gsub(/[ ]+/, " ") @@ -24,19 +24,11 @@ end end end return teaser end - - def display_time(disp_time, class_name = nil) + + def display_time(disp_time, class_name="") return distance_of_time_in_words_to_now(disp_time) + " ago" - # return_str = "" - # if ((Time.now - disp_time) < (6*24*60*60)) - # return_str = distance_of_time_in_words_to_now(disp_time) + " ago" - # else - # return_str = "#{disp_time.strftime('%m/%d/%y')}" - # end - # - # return content_tag("span", return_str, :class => (class_name.nil? ? "text-color-grey" : class_name)) end - + end \ No newline at end of file