Rename Upvote role to Votes

This commit is contained in:
Riyad Preukschas 2012-09-08 02:23:49 +02:00
parent 06c1a8a9ae
commit a2a0060034
6 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
class Issue < ActiveRecord::Base class Issue < ActiveRecord::Base
include IssueCommonality include IssueCommonality
include Upvote include Votes
acts_as_taggable_on :labels acts_as_taggable_on :labels

View file

@ -2,7 +2,7 @@ require File.join(Rails.root, "app/models/commit")
class MergeRequest < ActiveRecord::Base class MergeRequest < ActiveRecord::Base
include IssueCommonality include IssueCommonality
include Upvote include Votes
BROKEN_DIFF = "--broken-diff" BROKEN_DIFF = "--broken-diff"

View file

@ -1,4 +1,4 @@
module Upvote module Votes
# Return the number of +1 comments (upvotes) # Return the number of +1 comments (upvotes)
def upvotes def upvotes
notes.select(&:upvote?).size notes.select(&:upvote?).size

View file

@ -12,7 +12,7 @@ describe Issue do
describe 'modules' do describe 'modules' do
it { should include_module(IssueCommonality) } it { should include_module(IssueCommonality) }
it { should include_module(Upvote) } it { should include_module(Votes) }
end end
subject { Factory.create(:issue) } subject { Factory.create(:issue) }

View file

@ -8,6 +8,6 @@ describe MergeRequest do
describe 'modules' do describe 'modules' do
it { should include_module(IssueCommonality) } it { should include_module(IssueCommonality) }
it { should include_module(Upvote) } it { should include_module(Votes) }
end end
end end