aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2013-01-25 13:25:36 +1100
committerHenare Degan <henare.degan@gmail.com>2013-01-25 15:11:17 +1100
commit2eb33d8d683422743190bddead66e139b3f47b60 (patch)
tree64f4af7943c98f15410d57472615e1966655e9af
parentac2f058c50a4cfca40be06a7090cb6fe0527c04a (diff)
Formatting only: Group associations and validations
-rw-r--r--app/models/comment.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 4ea7a1365..53d3b9088 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -24,13 +24,12 @@ class Comment < ActiveRecord::Base
strip_attributes!
belongs_to :user
- #validates_presence_of :user # breaks during construction of new ones :(
+ belongs_to :info_request
+ has_many :info_request_events # in practice only ever has one
+ #validates_presence_of :user # breaks during construction of new ones :(
validates_inclusion_of :comment_type, :in => [ 'request' ]
validate :body_of_comment
- belongs_to :info_request
-
- has_many :info_request_events # in practice only ever has one
def body
ret = read_attribute(:body)