Mercurial > hg > soundsoftware-site
comparison app/helpers/.svn/text-base/messages_helper.rb.svn-base @ 246:eeebe205a056 cannam
* Merge from default branch, bringing us up to SVN trunk rev 4993
author | Chris Cannam |
---|---|
date | Thu, 03 Mar 2011 12:02:03 +0000 |
parents | 0579821a129a |
children |
comparison
equal
deleted
inserted
replaced
138:fca2657f4aa5 | 246:eeebe205a056 |
---|---|
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program; if not, write to the Free Software | 15 # along with this program; if not, write to the Free Software |
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | 17 |
18 module MessagesHelper | 18 module MessagesHelper |
19 | |
20 def link_to_message(message) | |
21 return '' unless message | |
22 link_to h(truncate(message.subject, :length => 60)), :controller => 'messages', | |
23 :action => 'show', | |
24 :board_id => message.board_id, | |
25 :id => message.root, | |
26 :r => (message.parent_id && message.id), | |
27 :anchor => (message.parent_id ? "message-#{message.id}" : nil) | |
28 end | |
29 end | 19 end |