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>
This commit is contained in:
Dmitriy Zaporozhets 2014-12-15 16:31:23 +02:00
parent 19865b7cfd
commit 4ab728bfe8
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
1 changed files with 1 additions and 1 deletions

View File

@ -502,6 +502,6 @@ class Note < ActiveRecord::Base
end
def editable?
!system
!read_attribute(:system)
end
end