diff --git a/app/controllers/benefit_forms_controller.rb b/app/controllers/benefit_forms_controller.rb new file mode 100644 index 0000000..c5f2bdf --- /dev/null +++ b/app/controllers/benefit_forms_controller.rb @@ -0,0 +1,17 @@ +class BenefitFormsController < ApplicationController + + def index + end + + def download + begin + #file = params[:type].constantize.new(params[:name]) + file = Rails.root.join('public', 'docs', params[:name]) + #render :text => File.read(file) + send_file file, :disposition => 'attachment' + rescue + redirect_to user_benefit_forms_path(:user_id => current_user.user_id) + end + end + +end diff --git a/app/helpers/benefit_forms_helper.rb b/app/helpers/benefit_forms_helper.rb new file mode 100644 index 0000000..4378d04 --- /dev/null +++ b/app/helpers/benefit_forms_helper.rb @@ -0,0 +1,2 @@ +module BenefitFormsHelper +end diff --git a/app/views/benefit_forms/index.html.erb b/app/views/benefit_forms/index.html.erb new file mode 100644 index 0000000..f529beb --- /dev/null +++ b/app/views/benefit_forms/index.html.erb @@ -0,0 +1,61 @@ +
+
+ +
+ +
+
+
+
+ Health Insurance +
+
+ +
+ <%= link_to download_path(:type => "File", :name => "Health_n_Stuff.pdf") do %> +
+
+ + + PDF + +
+ +
+ <% end %> +
+ +
+
+ +
+
+
+
+ Dental Insurance +
+
+ +
+ <%= link_to download_path(:type => "File", :name => "Dental_n_Stuff.pdf") do %> +
+
+ + + PDF + +
+ +
+ <% end %> +
+ +
+
+ + + + +
+
+
\ No newline at end of file diff --git a/app/views/layouts/shared/_sidebar.html.erb b/app/views/layouts/shared/_sidebar.html.erb index 31e8137..6391e64 100755 --- a/app/views/layouts/shared/_sidebar.html.erb +++ b/app/views/layouts/shared/_sidebar.html.erb @@ -18,13 +18,13 @@ <% end %> <% end %> -
  • - +
  • + <%= link_to user_benefit_forms_path(:user_id => current_user.user_id) do %>
    Benefit Forms -
    + <% end %>
  • <%= link_to user_retirement_index_path(:user_id => current_user.user_id) do %> diff --git a/config/routes.rb b/config/routes.rb index bdcdc6d..0ff89e9 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -23,9 +23,15 @@ resources :users do resources :performance do end + + resources :benefit_forms do + + end end +get "download" => "benefit_forms#download" + resources :tutorials do collection do get "injection" diff --git a/public/docs/Dental_n_Stuff.pdf b/public/docs/Dental_n_Stuff.pdf new file mode 100644 index 0000000..0ad51fe Binary files /dev/null and b/public/docs/Dental_n_Stuff.pdf differ diff --git a/public/docs/Health_n_Stuff.pdf b/public/docs/Health_n_Stuff.pdf new file mode 100644 index 0000000..3783d20 Binary files /dev/null and b/public/docs/Health_n_Stuff.pdf differ diff --git a/test/functional/benefit_forms_controller_test.rb b/test/functional/benefit_forms_controller_test.rb new file mode 100644 index 0000000..292f2f9 --- /dev/null +++ b/test/functional/benefit_forms_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class BenefitFormsControllerTest < ActionController::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/unit/helpers/benefit_forms_helper_test.rb b/test/unit/helpers/benefit_forms_helper_test.rb new file mode 100644 index 0000000..4b27105 --- /dev/null +++ b/test/unit/helpers/benefit_forms_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class BenefitFormsHelperTest < ActionView::TestCase +end