diff --git a/app/models/document.rb b/app/models/document.rb index fc5d15dd..a2c2088c 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -21,7 +21,7 @@ class Document < ActiveRecord::Base acts_as_attachable :delete_permission => :manage_documents acts_as_journalized :event_title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"}, - :event_url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.versioned_id}}, + :event_url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.journaled_id}}, :event_author => (Proc.new do |o| o.attachments.find(:first, :order => "#{Attachment.table_name}.created_on ASC").try(:author) end) diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 6feb4e0f..ca496b3a 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -197,8 +197,8 @@ class MailHandler < ActionMailer::Base # Reply will be added to the issue def receive_journal_reply(journal_id) journal = Journal.find_by_id(journal_id) - if journal and journal.versioned.is_a? Issue - receive_issue_reply(journal.versioned_id) + if journal and journal.journaled.is_a? Issue + receive_issue_reply(journal.journaled_id) end end diff --git a/app/models/news.rb b/app/models/news.rb index 46769876..9ded1e9e 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -24,7 +24,7 @@ class News < ActiveRecord::Base validates_length_of :title, :maximum => 60 validates_length_of :summary, :maximum => 255 - acts_as_journalized :event_url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.versioned_id} } + acts_as_journalized :event_url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.journaled_id} } acts_as_searchable :columns => ['title', 'summary', "#{table_name}.description"], :include => :project def visible?(user=User.current) diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml index 348421d3..b692ad73 100644 --- a/app/views/search/index.rhtml +++ b/app/views/search/index.rhtml @@ -26,7 +26,10 @@