added in johns constantize change as well as some other stuff like CSS fun

This commit is contained in:
John Poulin
2014-04-08 18:42:41 -04:00
committed by cktricky
parent 5bb9c75f06
commit 4bff205e81
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ class BenefitFormsController < ApplicationController
def download
begin
path = Rails.root.join('public', 'docs', params[:name])
path = params[:name]
file = params[:type].constantize.new(path)
send_file file, :disposition => 'attachment'
rescue
+2 -2
View File
@@ -13,7 +13,7 @@
<!-- Begin Widget Body -->
<div class="widget-body">
Click on PDF to download<br/><br/>
<%= link_to download_path(:type => "File", :name => "Health_n_Stuff.pdf") do %>
<%= link_to download_path(:type => "File", :name => "public/docs/Health_n_Stuff.pdf") do %>
<div class="doc-icons-container">
<div class="icon light-blue hidden-tablet">
<span class="fs1 doc-icon" aria-hidden="true" data-icon="&#xe1b2;"></span>
@@ -39,7 +39,7 @@
<!-- Begin Widget Body -->
<div class="widget-body">
Click on PDF to download<br/><br/>
<%= link_to download_path(:type => "File", :name => "Dental_n_Stuff.pdf") do %>
<%= link_to download_path(:type => "File", :name => "public/docs/Dental_n_Stuff.pdf") do %>
<div class="doc-icons-container">
<div class="icon light-blue hidden-tablet">
<span class="fs1 doc-icon" aria-hidden="true" data-icon="&#xe1b2;"></span>