diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-08-12 15:01:41 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-09-16 12:41:42 +0100 |
commit | 30c46fcebaab5d83a7f60b9754ae08a3045b8c39 (patch) | |
tree | c303780d98f7867ec957c0433150ecbf493eece5 /app/models | |
parent | c62b1ea80b3f3efa801c0adaad0b17edebc63570 (diff) |
Make prominence states a constant so we can access them elsewhere.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/incoming_message.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 37acc6a99..287120599 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -49,11 +49,8 @@ class IncomingMessage < ActiveRecord::Base belongs_to :raw_email - validates_inclusion_of :prominence, :in => [ - 'normal', - 'hidden', - 'requester_only' - ] + PROMINENCE_STATES = ['normal', 'hidden','requester_only'] + validates_inclusion_of :prominence, :in => PROMINENCE_STATES # See binary_mask_stuff function below. It just test for inclusion # in this hash, not the value of the right hand side. |