Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
3b6228dc
Commit
3b6228dc
authored
Mar 25, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
It's better to use STI instead
parent
83eb63cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
app/models/snippet.rb
app/models/snippet.rb
+0
-1
No files found.
app/models/snippet.rb
View file @
3b6228dc
...
...
@@ -34,7 +34,6 @@ class Snippet < ActiveRecord::Base
scope
:private
,
->
{
where
(
private:
true
)
}
scope
:fresh
,
->
{
order
(
"created_at DESC"
)
}
scope
:expired
,
->
{
where
([
"expires_at IS NOT NULL AND expires_at < ?"
,
Time
.
current
])
}
scope
:has_project
,
->
{
where
(
"bars.id IS NOT NULL"
)
}
scope
:non_expired
,
->
{
where
([
"expires_at IS NULL OR expires_at > ?"
,
Time
.
current
])
}
def
self
.
content_types
...
...
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