.nil? sometimes throws errors

pull/6827/head
friflaj 14 years ago
parent cb4cc5afac
commit db9a677534
  1. 13
      app/models/story.rb

@ -75,14 +75,11 @@ class Story < Issue
end
def points_display(notsized='-')
if story_points.nil?
return notsized
end
if story_points == 0
return 'S'
end
# For reasons I have yet to uncover, activerecord will
# sometimes return numbers as Fixnums that lack the nil?
# method. Comparing to nil should be safe.
return notsized if story_points == nil
return 'S' if story_points == 0
return story_points.to_s
end

Loading…
Cancel
Save