Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hacksaar
SpacePoints
Commits
ba178558
Commit
ba178558
authored
Feb 19, 2014
by
surma Lodur
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://xn--superbsewicht-nmb.de:8443/git/~mafolz/SpacePoints
parents
a007163d
5f463a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/models/hacker.rb
app/models/hacker.rb
+3
-3
No files found.
app/models/hacker.rb
View file @
ba178558
...
...
@@ -16,19 +16,19 @@ class Hacker < ActiveRecord::Base
# Summe aller jemals eingelösten Punkte
def
all_redeemed_points
return
2083
return
Redemption
.
sum
(
'points'
)
end
# Summe aller in den letzten 90 Tagen verdienten Punkte
def
recent_earned_points
return
26
return
Reward
.
where
(
'created_at >= ?'
,
Date
.
today
-
90
).
sum
(
'points'
)
end
# Summe aller jemals verdienten Punkte,
# unabhängig davon, ob diese bereits
# eingelöst wurden oder nicht
def
all_earned_points
return
2125
return
Reward
.
sum
(
'points'
)
end
# Verbleibendes Guthaben, d.h. alle jemals verdienten Punkte
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment