diff --git a/app/controllers/public/volunteerships_controller.rb b/app/controllers/public/volunteerships_controller.rb index a8a62aa..efe28c3 100644 --- a/app/controllers/public/volunteerships_controller.rb +++ b/app/controllers/public/volunteerships_controller.rb @@ -1,6 +1,6 @@ module Public class VolunteershipsController < Public::ApplicationController - before_filter :authenticate_user! + before_filter :authenticate_user!, only: [:create, :destroy] def index @volunteer_teams = current_conference.volunteer_teams diff --git a/lib/initfest/views/public/volunteerships/_volunteer_team.slim b/lib/initfest/views/public/volunteerships/_volunteer_team.slim index 9e2ed79..4767ca5 100644 --- a/lib/initfest/views/public/volunteerships/_volunteer_team.slim +++ b/lib/initfest/views/public/volunteerships/_volunteer_team.slim @@ -4,7 +4,7 @@ h2 = volunteer_team.name .description = simple_format volunteer_team.description - - if volunteer_team.include? current_user + - if signed_in? and volunteer_team.include? current_user = button_to t('views.volunteerships.withdraw_application'), volunteership_path(volunteer_team.volunteerships.where(volunteer: current_user).first), class: ['btn-link', 'btn-link-red'], method: :delete - else = button_to t('views.volunteerships.apply'), volunteer_team_volunteership_path(volunteer_team), class: ['btn-link']