fixes #948
This commit is contained in:
@@ -132,7 +132,7 @@ class AnonymousUser
|
||||
|
||||
def decrement!(field)
|
||||
end
|
||||
|
||||
|
||||
def role
|
||||
:anonymous
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><%= link_to note_version.post_id, post_path(note_version.post_id) %></td>
|
||||
<td><%= link_to "#{note_version.note_id}.#{note_version.id}", note_versions_path(:search => {:note_id => note_version.note_id}) %></td>
|
||||
<td><%= link_to "#{note_version.note_id}.#{note_version.version}", note_versions_path(:search => {:note_id => note_version.note_id}) %></td>
|
||||
<td><%= h(note_version.body) %> <% unless note_version.is_active? %>(deleted)<% end %></td>
|
||||
<% if CurrentUser.is_janitor? %>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user