Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
9fd42afbc9cc
Commit
9fd42afb
authored
Jun 11, 2013
by
Dmitriy Zaporozhets
Browse files
Refactor Project.abandoned method
parent
5468cd27444f
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
9fd42afb
...
...
@@ -110,11 +110,7 @@
class
<<
self
def
abandoned
project_ids
=
Event
.
select
(
'max(created_at) as latest_date, project_id'
).
group
(
'project_id'
).
having
(
'latest_date < ?'
,
6
.
months
.
ago
).
map
(
&
:project_id
)
where
(
id:
project_ids
)
where
(
'projects.last_activity_at < ?'
,
6
.
months
.
ago
)
end
def
with_push
...
...
Write
Preview
Supports
Markdown
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