summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-15 15:05:22 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-15 15:05:22 +0000
commit14ab0228a889980df2e4ce58815b1fff6d916dc1 (patch)
tree0f27a7f24d2247365bed6354059ec1646f293286
parent19865b7cfd4d081f6bee6e973858ee488e995561 (diff)
parent4ab728bfe89adbc8f9d430e80f0582b1775a50d5 (diff)
downloadgitlab-ce-14ab0228a889980df2e4ce58815b1fff6d916dc1.tar.gz
Merge branch 'fix-note-update' into 'master'
Fix note update 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. Exception log: ``` ArgumentError (wrong number of arguments (0 for 1+)): app/models/note.rb:505:in `system' app/models/note.rb:505:in `editable?' app/controllers/projects/notes_controller.rb:33:in `update' ``` See merge request !1326
-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