Adds anchor to atom feed messages links.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1588 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-06-26 19:04:58 +00:00
parent b3939fb134
commit 0fd9b102be

View File

@ -29,7 +29,8 @@ class Message < ActiveRecord::Base
acts_as_event :title => Proc.new {|o| "#{o.board.name}: #{o.subject}"},
:description => :content,
:type => Proc.new {|o| o.parent_id.nil? ? 'message' : 'reply'},
:url => Proc.new {|o| {:controller => 'messages', :action => 'show', :board_id => o.board_id, :id => o.id}}
:url => Proc.new {|o| {:controller => 'messages', :action => 'show', :board_id => o.board_id}.merge(o.parent_id.nil? ? {:id => o.id} :
{:id => o.parent_id, :anchor => "message-#{o.id}"})}
attr_protected :locked, :sticky
validates_presence_of :subject, :content