Mercurial > hg > soundsoftware-site
comparison app/helpers/messages_helper.rb @ 523:0b6c82dead28 luisf
Merge from branch "cannam"
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 25 Jul 2011 14:23:37 +0100 |
parents | 0579821a129a |
children | cbb26bc654de |
comparison
equal
deleted
inserted
replaced
318:f7c525dc7585 | 523:0b6c82dead28 |
---|---|
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 |