Navigation Menu

Skip to content

Commit

Permalink
Fix news revisions attribution
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Jun 30, 2013
1 parent cc6eb37 commit b72ae6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/link.rb
Expand Up @@ -44,18 +44,18 @@ def nb_clicks
end

def update_by(user)
self.user = user
if url.blank?
destroy
else
self.user = user
$redis.del lock_key
save
end
end

after_save :create_new_version
after_commit :create_new_version
def create_new_version
news.editor = user.try(:account)
news.editor ||= user.try(:account)
news.put_paragraphs_together
news.create_new_version
end
Expand Down

0 comments on commit b72ae6c

Please sign in to comment.