Commit cf31f289d7bf073e8d8d91b6ee8df1225596e4dd

Authored by Dmitriy Zaporozhets
1 parent 231b91d0

Move project_last_activity to ProjectsHelper

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/helpers/application_helper.rb
... ... @@ -136,14 +136,6 @@ module ApplicationHelper
136 136 Digest::SHA1.hexdigest string
137 137 end
138 138  
139   - def project_last_activity(project)
140   - if project.last_activity_at
141   - time_ago_with_tooltip(project.last_activity_at, 'bottom', 'last_activity_time_ago') + " ago"
142   - else
143   - "Never"
144   - end
145   - end
146   -
147 139 def authbutton(provider, size = 64)
148 140 file_name = "#{provider.to_s.split('_').first}_#{size}.png"
149 141 image_tag("authbuttons/#{file_name}",
... ...
app/helpers/projects_helper.rb
... ... @@ -187,4 +187,12 @@ module ProjectsHelper
187 187 def default_clone_protocol
188 188 current_user ? "ssh" : "http"
189 189 end
  190 +
  191 + def project_last_activity(project)
  192 + if project.last_activity_at
  193 + time_ago_with_tooltip(project.last_activity_at, 'bottom', 'last_activity_time_ago') + " ago"
  194 + else
  195 + "Never"
  196 + end
  197 + end
190 198 end
... ...