summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-07-28 19:02:56 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-08-15 13:18:15 -0500
commit722fc84e3d4785fb3a9db5f1c7d2aabad22e8e01 (patch)
treebc87237d15d15216cb6b59af27eee36278e7b962 /app/models/issue.rb
parent95419679f23f0628d1885dd9656cc159e9d55ea9 (diff)
downloadgitlab-ce-722fc84e3d4785fb3a9db5f1c7d2aabad22e8e01.tar.gz
Complete refactor of the `Spammable` concern and tests:
- Merged `AkismetSubmittable` into `Spammable` - Clean up `SpamCheckService` - Added tests for `Spammable` - Added submit (ham or spam) options to `AkismetHelper`
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 6c2635498e5..5408e24b21c 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -37,6 +37,8 @@ class Issue < ActiveRecord::Base
scope :order_due_date_asc, -> { reorder('issues.due_date IS NULL, issues.due_date ASC') }
scope :order_due_date_desc, -> { reorder('issues.due_date IS NULL, issues.due_date DESC') }
+ attr_spammable :title, :description
+
state_machine :state, initial: :opened do
event :close do
transition [:reopened, :opened] => :closed