added in johns constantize change as well as some other stuff like CSS fun
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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=""></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=""></span>
|
||||
|
||||
Reference in New Issue
Block a user