DownloadLinkHelper - Ruby on Rails Plugin
Synopsis
DownloadLinkHelper is a small plugin for Ruby on Rails that adds a new download_link_tag
that can be called from within your views. It then generates the link along with the file-size in
parenthesis.
Usage
<%= download_link_tag 'Jingle', 'jingle.ogg' %>
renders to
<a href="downloads/jingle.ogg">Jingle</a> (159.33 KB)
Installation
The easiest and most Rails-like installation is to call the following from the root of your Rails application:
$ ./script/plugin install svn://rubyforge.org/var/svn/dl-link-helper/trunk
and you are ready to go.
Alternatively it is also possible to download
either the .tar.gz or .zip file and extract it in
RAILS_ROOT/vendor/plugins/.
You also have to manually create the downloads directory in RAILS_ROOT/public,
something that is done automatically using the ./script/plugin way.
Project website
The RubyForge project website can be found here.
Copyright notice
This work may be distributed and/or modified under the conditions of the MIT license. Please refer to
the LICENSE file provided with this software.