From 4ab728bfe89adbc8f9d430e80f0582b1775a50d5 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 15 Dec 2014 16:31:23 +0200 Subject: 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 --- app/models/note.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1