This commit is contained in:
albert
2013-03-22 10:47:24 -07:00
parent 3e4d149d28
commit 4dcc21a97a
6 changed files with 30 additions and 7 deletions

View File

@@ -123,7 +123,8 @@ class Note < ActiveRecord::Base
end
def create_version
CurrentUser.increment!(:note_update_count)
CurrentUser.user.increment!(:note_update_count)
update_column(:version, version.to_i + 1)
versions.create(
:updater_id => updater_id,
@@ -134,7 +135,8 @@ class Note < ActiveRecord::Base
:width => width,
:height => height,
:is_active => is_active,
:body => body
:body => body,
:version => version
)
end