Commit d592009d by Rocky Duan

more compact code

parent 07eff5ff
......@@ -11,9 +11,7 @@ class Notification
attr_accessible :notification_type, :info
validates_presence_of :notification_type
if not CommentService.config["allow_anonymity"]
validates_presence_of :actor
end
validates_presence_of :actor if not CommentService.config["allow_anonymity"]
validates_presence_of :target
has_and_belongs_to_many :receivers, class_name: "User", inverse_of: :notifications, autosave: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment