summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-15 16:31:23 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-15 16:31:23 +0200
commit4ab728bfe89adbc8f9d430e80f0582b1775a50d5 (patch)
tree0f27a7f24d2247365bed6354059ec1646f293286
parent19865b7cfd4d081f6bee6e973858ee488e995561 (diff)
downloadgitlab-ce-4ab728bfe89adbc8f9d430e80f0582b1775a50d5.tar.gz
Fix random Argument error when update note
In some strange cases Ruby thinks `system` is not AR field but Kernel.system call and raises exception during save. It should prevent this random wierd behaviour Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/models/note.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 5bf645bbd1d..5996298be22 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -502,6 +502,6 @@ class Note < ActiveRecord::Base
end
def editable?
- !system
+ !read_attribute(:system)
end
end