Skip to content

Commit

Permalink
Fix the user_id of revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Dec 12, 2011
1 parent 6d923bb commit 3efe1af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/news.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def announce_modification

after_save :create_new_version, :if => Proc.new { |news| news.body_changed? || news.second_part_changed? || news.title_changed? }
def create_new_version
v = versions.create(:user_id => (editor || author_account).try(:id),
v = versions.create(:user_id => (editor || author_account).try(:user_id),
:title => title,
:body => wiki_body,
:second_part => wiki_second_part,
Expand Down

0 comments on commit 3efe1af

Please sign in to comment.