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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
a2a00600
Commit
a2a00600
authored
Sep 08, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Upvote role to Votes
parent
06c1a8a9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/issue.rb
app/models/issue.rb
+1
-1
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
app/roles/votes.rb
app/roles/votes.rb
+1
-1
spec/models/issue_spec.rb
spec/models/issue_spec.rb
+1
-1
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-1
spec/roles/votes_spec.rb
spec/roles/votes_spec.rb
+0
-0
No files found.
app/models/issue.rb
View file @
a2a00600
class
Issue
<
ActiveRecord
::
Base
include
IssueCommonality
include
Upvote
include
Votes
acts_as_taggable_on
:labels
...
...
app/models/merge_request.rb
View file @
a2a00600
...
...
@@ -2,7 +2,7 @@ require File.join(Rails.root, "app/models/commit")
class
MergeRequest
<
ActiveRecord
::
Base
include
IssueCommonality
include
Upvote
include
Votes
BROKEN_DIFF
=
"--broken-diff"
...
...
app/roles/
upvote
.rb
→
app/roles/
votes
.rb
View file @
a2a00600
module
Upvote
module
Votes
# Return the number of +1 comments (upvotes)
def
upvotes
notes
.
select
(
&
:upvote?
).
size
...
...
spec/models/issue_spec.rb
View file @
a2a00600
...
...
@@ -12,7 +12,7 @@ describe Issue do
describe
'modules'
do
it
{
should
include_module
(
IssueCommonality
)
}
it
{
should
include_module
(
Upvote
)
}
it
{
should
include_module
(
Votes
)
}
end
subject
{
Factory
.
create
(
:issue
)
}
...
...
spec/models/merge_request_spec.rb
View file @
a2a00600
...
...
@@ -8,6 +8,6 @@ describe MergeRequest do
describe
'modules'
do
it
{
should
include_module
(
IssueCommonality
)
}
it
{
should
include_module
(
Upvote
)
}
it
{
should
include_module
(
Votes
)
}
end
end
spec/roles/
upvote
_spec.rb
→
spec/roles/
votes
_spec.rb
View file @
a2a00600
File moved
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