diff --git a/app/assets/images/campaigns/bird.gif b/app/assets/images/campaigns/bird.gif deleted file mode 100644 index cb83e601..00000000 Binary files a/app/assets/images/campaigns/bird.gif and /dev/null differ diff --git a/app/assets/images/campaigns/hug.gif b/app/assets/images/campaigns/hug.gif deleted file mode 100644 index 628712ee..00000000 Binary files a/app/assets/images/campaigns/hug.gif and /dev/null differ diff --git a/app/assets/images/campaigns/purple.png b/app/assets/images/fundraising/purple.png similarity index 100% rename from app/assets/images/campaigns/purple.png rename to app/assets/images/fundraising/purple.png diff --git a/app/assets/javascripts/campaigns.js b/app/assets/javascripts/campaigns.js deleted file mode 100644 index dee720fa..00000000 --- a/app/assets/javascripts/campaigns.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/app/assets/javascripts/static/donate.js b/app/assets/javascripts/fundraising/campaigns/show.js similarity index 100% rename from app/assets/javascripts/static/donate.js rename to app/assets/javascripts/fundraising/campaigns/show.js diff --git a/app/assets/javascripts/donations/show.js b/app/assets/javascripts/fundraising/donations/show.js similarity index 100% rename from app/assets/javascripts/donations/show.js rename to app/assets/javascripts/fundraising/donations/show.js diff --git a/app/assets/stylesheets/application.css.sass b/app/assets/stylesheets/application.css.sass index 73c0a1f2..a70a3a69 100644 --- a/app/assets/stylesheets/application.css.sass +++ b/app/assets/stylesheets/application.css.sass @@ -8,11 +8,9 @@ @import partials/jquery.jgrowl @import alt_styles/index -@import campaigns/show @import closet_hangers/index @import closet_hangers/petpage @import closet_lists/form -@import donations/show @import neopets_page_import_tasks/new @import contributions/index @import items diff --git a/app/assets/stylesheets/campaigns/_show.sass b/app/assets/stylesheets/campaigns/_show.sass deleted file mode 100644 index 5313c3db..00000000 --- a/app/assets/stylesheets/campaigns/_show.sass +++ /dev/null @@ -1,227 +0,0 @@ -@import "partials/clean/constants" -@import "partials/campaign-progress" -@import "partials/outfit" - -/* TODO: redundant with outfits/index; why is it not in the partial? */ -$outfit-inner-height: 150px -$outfit-inner-width: 150px -$outfit-banner-h-padding: 4px -$outfit-banner-v-padding: 2px -$outfit-banner-inner-width: $outfit-inner-width - (2 * $outfit-banner-h-padding) - -body.campaigns-show, body.campaigns-current - +campaign-progress - color: $campaign-text-color - - a - color: $campaign-text-color + #222 !important - - #home-link:hover - background-color: $campaign-background-color - - #userbar, #footer - color: $text-color - a - color: $link-color - - #home-link - color: $link-color - - #title - display: none - - #donation-form - +module - background: $campaign-background-color - border-color: $campaign-border-color - display: flex - flex-direction: row - margin-top: 1em - margin-bottom: 1.5em - padding-bottom: 32px - padding-left: 24px - padding-right: 24px - padding-top: 32px - position: relative - - // We ignore the theme attribute on campaigns now, and just do purple. - &::after - background: - image: url(image_path("campaigns/purple.png")) - repeat: no-repeat - bottom: 0 - content: " " - height: 123px - position: absolute - right: 4px - width: 150px - - header, #donation-fields - flex: 1 - - #donation-form-title - font-size: 125% - font-weight: bold - margin-bottom: .25em - margin-top: 0 - - p - font-family: $main-font - font-size: 85% - margin-bottom: 0 - margin-top: .5em - - #donation-fields - margin-left: 20px - padding-top: 7px - - #amount-header - font-size: 85% - font-weight: bold - line-height: 1 - - #amount-choices - $amount-choices-border-color: desaturate(lighten($campaign-border-color, 30%), 30%) - - display: flex - flex-direction: row - margin-bottom: .75em - margin-top: .5em - - li - border: 1px solid $amount-choices-border-color - border-radius: 5px - display: block - flex: 1 - list-style: none - overflow: hidden - text-align: center - - &:not(:last-of-type) - margin-right: .75em - - input[type=radio] - height: 0 - margin: 0 - padding: 0 - opacity: 0 - position: absolute - width: 0 - - label - border: 1px solid transparent - box-sizing: border-box - display: block - padding: .5em .5em - width: 100% - - input[type=radio]:checked ~ label - background: lighten($amount-choices-border-color, 15%) - font-weight: bold - - input[type=radio]:focus ~ label - border-color: white - border-radius: 5px - - #amount-custom-fields - display: none - - input[type=text] - font-family: inherit - font-size: inherit - line-height: 1 - padding: 0 - text-align: center - - #amount-custom:checked ~ #amount-custom-fields - display: block - - #amount-custom:checked ~ label[for=amount-custom] - display: none - - input[type=text] - border-color: #cce - color: $campaign-text-color - width: 3em - - #donation-controls - button - +awesome-button-color(#004) - font-size: 120% - - #campaign-text[data-campaign-complete] - #description - display: none - &[data-show] - display: block - - #success-thanks - border: 1px dashed $module-border-color - margin-bottom: 1em - padding: 1em - position: relative - - p:last-child - margin-bottom: 0 - - #success-thanks-toggle-description - position: absolute - bottom: 1em - font-style: italic - right: 1em - - #outfits - +outfits-list - text-align: center - - > li - +outfit - - height: $outfit-inner-height - margin: 2px - width: $outfit-inner-width - - header, footer - font-size: 85% - padding: $outfit-banner-v-padding $outfit-banner-h-padding - width: $outfit-banner-inner-width - - img - height: $outfit-inner-height - width: $outfit-inner-width - - &.banner - background-image: url(https://images.neopets.com/themes/004_bir_a2e60/footer_bg.png) - background-position: 0 -60px - border: 2px solid #006 - color: white - height: 100px - line-height: 100px - margin: 4px 0 - text-shadow: #335 2px 2px 1px - width: 800px - 4px - - span - +inline-block - font-size: 32px - font-weight: bold - line-height: 1.5 - vertical-align: middle - - #last-years-donors - font-weight: bold - margin-top: 1em - text-align: center - - #outfits-header > * - display: inline-block - - #all-campaigns-list - li - display: inline-block - list-style: none - margin-left: 1em - - #fine-print - font-size: 85% - margin-top: 2em diff --git a/app/assets/stylesheets/donations/_show.sass b/app/assets/stylesheets/donations/_show.sass deleted file mode 100644 index 59ade3a0..00000000 --- a/app/assets/stylesheets/donations/_show.sass +++ /dev/null @@ -1,29 +0,0 @@ -@import "../partials/clean/constants" -@import "../partials/clean/mixins" - -body.donations-show - #thank-you - border: 3px solid $module-border-color - display: block - margin: 0 auto 1em - - #edit-donation - ul - list-style: none - - label - +inline-block - width: 16em - - .name input[type=text] - width: 10em - - .feature input[type=text] - width: 23em - - .choose-outfit - font-size: 85% - margin-left: 1em - - select - width: 10em diff --git a/app/assets/stylesheets/fundraising/campaigns/show.css.sass b/app/assets/stylesheets/fundraising/campaigns/show.css.sass new file mode 100644 index 00000000..ff9bd398 --- /dev/null +++ b/app/assets/stylesheets/fundraising/campaigns/show.css.sass @@ -0,0 +1,227 @@ +@import "../../partials/clean/constants" +@import "../../partials/campaign-progress" +@import "../../partials/outfit" + +/* TODO: redundant with outfits/index; why is it not in the partial? */ +$outfit-inner-height: 150px +$outfit-inner-width: 150px +$outfit-banner-h-padding: 4px +$outfit-banner-v-padding: 2px +$outfit-banner-inner-width: $outfit-inner-width - (2 * $outfit-banner-h-padding) + +body.fundraising-campaigns + +campaign-progress + color: $campaign-text-color + +a + color: $campaign-text-color + #222 !important + +#home-link:hover + background-color: $campaign-background-color + +#userbar, #footer + color: $text-color + a + color: $link-color + +#home-link + color: $link-color + +#title + display: none + +#donation-form + +module + background: $campaign-background-color + border-color: $campaign-border-color + display: flex + flex-direction: row + margin-top: 1em + margin-bottom: 1.5em + padding-bottom: 32px + padding-left: 24px + padding-right: 24px + padding-top: 32px + position: relative + + // We ignore the theme attribute on campaigns now, and just do purple. + &::after + background: + image: url(image_path("fundraising/purple.png")) + repeat: no-repeat + bottom: 0 + content: " " + height: 123px + position: absolute + right: 4px + width: 150px + + header, #donation-fields + flex: 1 + + #donation-form-title + font-size: 125% + font-weight: bold + margin-bottom: .25em + margin-top: 0 + + p + font-family: $main-font + font-size: 85% + margin-bottom: 0 + margin-top: .5em + + #donation-fields + margin-left: 20px + padding-top: 7px + + #amount-header + font-size: 85% + font-weight: bold + line-height: 1 + + #amount-choices + $amount-choices-border-color: desaturate(lighten($campaign-border-color, 30%), 30%) + + display: flex + flex-direction: row + margin-bottom: .75em + margin-top: .5em + + li + border: 1px solid $amount-choices-border-color + border-radius: 5px + display: block + flex: 1 + list-style: none + overflow: hidden + text-align: center + + &:not(:last-of-type) + margin-right: .75em + + input[type=radio] + height: 0 + margin: 0 + padding: 0 + opacity: 0 + position: absolute + width: 0 + + label + border: 1px solid transparent + box-sizing: border-box + display: block + padding: .5em .5em + width: 100% + + input[type=radio]:checked ~ label + background: lighten($amount-choices-border-color, 15%) + font-weight: bold + + input[type=radio]:focus ~ label + border-color: white + border-radius: 5px + + #amount-custom-fields + display: none + + input[type=text] + font-family: inherit + font-size: inherit + line-height: 1 + padding: 0 + text-align: center + + #amount-custom:checked ~ #amount-custom-fields + display: block + + #amount-custom:checked ~ label[for=amount-custom] + display: none + + input[type=text] + border-color: #cce + color: $campaign-text-color + width: 3em + + #donation-controls + button + +awesome-button-color(#004) + font-size: 120% + +#campaign-text[data-campaign-complete] + #description + display: none + &[data-show] + display: block + +#success-thanks + border: 1px dashed $module-border-color + margin-bottom: 1em + padding: 1em + position: relative + + p:last-child + margin-bottom: 0 + +#success-thanks-toggle-description + position: absolute + bottom: 1em + font-style: italic + right: 1em + +#outfits + +outfits-list + text-align: center + + > li + +outfit + + height: $outfit-inner-height + margin: 2px + width: $outfit-inner-width + + header, footer + font-size: 85% + padding: $outfit-banner-v-padding $outfit-banner-h-padding + width: $outfit-banner-inner-width + + img + height: $outfit-inner-height + width: $outfit-inner-width + + &.banner + background-image: url(https://images.neopets.com/themes/004_bir_a2e60/footer_bg.png) + background-position: 0 -60px + border: 2px solid #006 + color: white + height: 100px + line-height: 100px + margin: 4px 0 + text-shadow: #335 2px 2px 1px + width: 800px - 4px + + span + +inline-block + font-size: 32px + font-weight: bold + line-height: 1.5 + vertical-align: middle + +#last-years-donors + font-weight: bold + margin-top: 1em + text-align: center + +#outfits-header > * + display: inline-block + +#all-campaigns-list + li + display: inline-block + list-style: none + margin-left: 1em + +#fine-print + font-size: 85% + margin-top: 2em diff --git a/app/assets/stylesheets/fundraising/donations/show.css.sass b/app/assets/stylesheets/fundraising/donations/show.css.sass new file mode 100644 index 00000000..c2ac6c1c --- /dev/null +++ b/app/assets/stylesheets/fundraising/donations/show.css.sass @@ -0,0 +1,28 @@ +@import "../../partials/clean/constants" +@import "../../partials/clean/mixins" + +#thank-you + border: 3px solid $module-border-color + display: block + margin: 0 auto 1em + +#edit-donation + ul + list-style: none + + label + +inline-block + width: 16em + + .name input[type=text] + width: 10em + + .feature input[type=text] + width: 23em + + .choose-outfit + font-size: 85% + margin-left: 1em + + select + width: 10em diff --git a/app/controllers/campaigns_controller.rb b/app/controllers/campaigns_controller.rb deleted file mode 100644 index 384094f6..00000000 --- a/app/controllers/campaigns_controller.rb +++ /dev/null @@ -1,27 +0,0 @@ -class CampaignsController < ApplicationController - def show - @campaign = Campaign.find(params[:id]) - redirect_to(action: :current) if @campaign.active? - @current_campaign = Campaign.current - @donations = find_donations - @all_campaigns = find_all_campaigns - end - - def current - @campaign = Campaign.current - @current_campaign = @campaign - @donations = find_donations - @all_campaigns = find_all_campaigns - render action: :show - end - - private - - def find_all_campaigns - @all_campaigns = Campaign.order('created_at DESC').all - end - - def find_donations - @campaign.donations.includes(features: :outfit).order('created_at DESC') - end -end diff --git a/app/controllers/donation_features_controller.rb b/app/controllers/donation_features_controller.rb deleted file mode 100644 index 6436e8d6..00000000 --- a/app/controllers/donation_features_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class DonationFeaturesController < ApplicationController - def index - # TODO: scope by campaign? - @features = DonationFeature.includes(:donation).includes(:outfit). - where('outfit_id IS NOT NULL') - render json: @features - end -end diff --git a/app/controllers/donations_controller.rb b/app/controllers/donations_controller.rb deleted file mode 100644 index 08892ec8..00000000 --- a/app/controllers/donations_controller.rb +++ /dev/null @@ -1,56 +0,0 @@ -class DonationsController < ApplicationController - def create - @campaign = Campaign.current - begin - @donation = Donation.create_from_charge( - @campaign, current_user, params[:donation]) - rescue Stripe::CardError => e - flash[:alert] = "We couldn't process your donation: #{e.message}" - redirect_to :donate - rescue => e - flash[:alert] = - "We couldn't process your donation: #{e.message} " + - "Please try again later!" - redirect_to :donate - else - redirect_to @donation - end - end - - def show - @donation = Donation.from_param(params[:id]) - @features = @donation.features - @outfits = current_user.outfits.wardrobe_order if user_signed_in? - end - - def update - @donation = Donation.from_param(params[:id]) - @donation.attributes = donation_params - - feature_params = params[:feature] || {} - @features = @donation.features.find(feature_params.keys) - @features.each do |feature| - feature.outfit_url = feature_params[feature.id.to_s][:outfit_url] - end - - begin - Donation.transaction do - @donation.save! - @features.each(&:save!) - end - rescue ActiveRecord::RecordInvalid - flash[:alert] = "Couldn't save donation details. Do those outfits exist?" - redirect_to @donation - else - flash[:notice] = 'Donation details saved! ' + - 'Also, have we thanked you yet today? Thank you!' - redirect_to @donation - end - end - - private - - def donation_params - params.require(:donation).permit(:donor_name) - end -end diff --git a/app/controllers/fundraising/campaigns_controller.rb b/app/controllers/fundraising/campaigns_controller.rb new file mode 100644 index 00000000..6790f6dd --- /dev/null +++ b/app/controllers/fundraising/campaigns_controller.rb @@ -0,0 +1,29 @@ +module Fundraising + class CampaignsController < ApplicationController + def show + @campaign = Campaign.find(params[:id]) + redirect_to(action: :current) if @campaign.active? + @current_campaign = Campaign.current + @donations = find_donations + @all_campaigns = find_all_campaigns + end + + def current + @campaign = Campaign.current + @current_campaign = @campaign + @donations = find_donations + @all_campaigns = find_all_campaigns + render action: :show + end + + private + + def find_all_campaigns + @all_campaigns = Campaign.order('created_at DESC').all + end + + def find_donations + @campaign.donations.includes(features: :outfit).order('created_at DESC') + end + end +end diff --git a/app/controllers/fundraising/donation_features_controller.rb b/app/controllers/fundraising/donation_features_controller.rb new file mode 100644 index 00000000..81bc1d08 --- /dev/null +++ b/app/controllers/fundraising/donation_features_controller.rb @@ -0,0 +1,10 @@ +module Fundraising + class DonationFeaturesController < ApplicationController + def index + # TODO: scope by campaign? + @features = DonationFeature.includes(:donation).includes(:outfit). + where('outfit_id IS NOT NULL') + render json: @features + end + end +end diff --git a/app/controllers/fundraising/donations_controller.rb b/app/controllers/fundraising/donations_controller.rb new file mode 100644 index 00000000..b7711555 --- /dev/null +++ b/app/controllers/fundraising/donations_controller.rb @@ -0,0 +1,58 @@ +module Fundraising + class DonationsController < ApplicationController + def create + @campaign = Campaign.current + begin + @donation = Donation.create_from_charge( + @campaign, current_user, params[:donation]) + rescue Stripe::CardError => e + flash[:alert] = "We couldn't process your donation: #{e.message}" + redirect_to :donate + rescue => e + flash[:alert] = + "We couldn't process your donation: #{e.message} " + + "Please try again later!" + redirect_to :donate + else + redirect_to @donation + end + end + + def show + @donation = Donation.from_param(params[:id]) + @features = @donation.features + @outfits = current_user.outfits.wardrobe_order if user_signed_in? + end + + def update + @donation = Donation.from_param(params[:id]) + @donation.attributes = donation_params + + feature_params = params[:feature] || {} + @features = @donation.features.find(feature_params.keys) + @features.each do |feature| + feature.outfit_url = feature_params[feature.id.to_s][:outfit_url] + end + + begin + Donation.transaction do + @donation.save! + @features.each(&:save!) + end + rescue ActiveRecord::RecordInvalid + flash[:alert] = "Couldn't save donation details. Do those outfits exist?" + redirect_to @donation + else + flash[:notice] = 'Donation details saved! ' + + 'Also, have we thanked you yet today? Thank you!' + redirect_to @donation + end + end + + private + + def donation_params + params.require(:donation).permit(:donor_name) + end + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e8aaa775..db796063 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -15,7 +15,8 @@ module ApplicationHelper end def body_class - "#{params[:controller]} #{params[:controller]}-#{params[:action]}".tap do |output| + controller = params[:controller].gsub("/", "-") + "#{controller} #{controller}-#{params[:action]}".tap do |output| output << @body_class if @body_class end end diff --git a/app/helpers/donations_helper.rb b/app/helpers/donations_helper.rb deleted file mode 100644 index e50e0849..00000000 --- a/app/helpers/donations_helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -module DonationsHelper - THANK_YOU_GREETINGS = [ - 'https://images.neopets.com/new_greetings/1368.gif', - 'https://images.neopets.com/new_greetings/466.gif', - 'https://images.neopets.com/new_greetings/48.gif', - 'https://images.neopets.com/new_greetings/49.gif', - 'https://images.neopets.com/new_greetings/64.gif', - 'https://images.neopets.com/new_greetings/65.gif', - 'https://images.neopets.com/new_greetings/66.gif', - 'https://images.neopets.com/new_greetings/67.gif', - 'https://images.neopets.com/new_greetings/69.gif', - 'https://images.neopets.com/new_greetings/71.gif', - 'https://images.neopets.com/new_greetings/72.gif', - 'https://images.neopets.com/new_greetings/103.gif', - 'https://images.neopets.com/new_greetings/420.gif' - ] - - def thank_you_greeting_url - THANK_YOU_GREETINGS.sample - end - - def feature_outfit_url(outfit_id) - outfit_url(outfit_id) if outfit_id - end -end diff --git a/app/helpers/fundraising/campaigns_helper.rb b/app/helpers/fundraising/campaigns_helper.rb new file mode 100644 index 00000000..35bba30d --- /dev/null +++ b/app/helpers/fundraising/campaigns_helper.rb @@ -0,0 +1,11 @@ +module Fundraising + module CampaignsHelper + def large_donation?(amount) + amount > 100_00 + end + + def outfit_image?(outfit) + outfit.present? && outfit.image? + end + end +end diff --git a/app/helpers/fundraising/donations_helper.rb b/app/helpers/fundraising/donations_helper.rb new file mode 100644 index 00000000..3386ba5b --- /dev/null +++ b/app/helpers/fundraising/donations_helper.rb @@ -0,0 +1,27 @@ +module Fundraising + module DonationsHelper + THANK_YOU_GREETINGS = [ + 'https://images.neopets.com/new_greetings/1368.gif', + 'https://images.neopets.com/new_greetings/466.gif', + 'https://images.neopets.com/new_greetings/48.gif', + 'https://images.neopets.com/new_greetings/49.gif', + 'https://images.neopets.com/new_greetings/64.gif', + 'https://images.neopets.com/new_greetings/65.gif', + 'https://images.neopets.com/new_greetings/66.gif', + 'https://images.neopets.com/new_greetings/67.gif', + 'https://images.neopets.com/new_greetings/69.gif', + 'https://images.neopets.com/new_greetings/71.gif', + 'https://images.neopets.com/new_greetings/72.gif', + 'https://images.neopets.com/new_greetings/103.gif', + 'https://images.neopets.com/new_greetings/420.gif' + ] + + def thank_you_greeting_url + THANK_YOU_GREETINGS.sample + end + + def feature_outfit_url(outfit_id) + outfit_url(outfit_id) if outfit_id + end + end +end diff --git a/app/helpers/static_helper.rb b/app/helpers/static_helper.rb deleted file mode 100644 index fc37f273..00000000 --- a/app/helpers/static_helper.rb +++ /dev/null @@ -1,9 +0,0 @@ -module StaticHelper - def large_donation?(amount) - amount > 100_00 - end - - def outfit_image?(outfit) - outfit.present? && outfit.image? - end -end diff --git a/app/mailers/donation_mailer.rb b/app/mailers/donation_mailer.rb deleted file mode 100644 index 97a26abe..00000000 --- a/app/mailers/donation_mailer.rb +++ /dev/null @@ -1,8 +0,0 @@ -class DonationMailer < ActionMailer::Base - default from: "matchu@openneo.net" - - def thank_you_email(donation, recipient) - @donation = donation - mail(to: recipient, subject: 'Thanks for donating to Dress to Impress!') - end -end diff --git a/app/mailers/fundraising/donation_mailer.rb b/app/mailers/fundraising/donation_mailer.rb new file mode 100644 index 00000000..0453d28e --- /dev/null +++ b/app/mailers/fundraising/donation_mailer.rb @@ -0,0 +1,10 @@ +module Fundraising + class DonationMailer < ActionMailer::Base + default from: "matchu@openneo.net" + + def thank_you_email(donation, recipient) + @donation = donation + mail(to: recipient, subject: 'Thanks for donating to Dress to Impress!') + end + end +end diff --git a/app/views/campaigns/show.html.haml b/app/views/fundraising/campaigns/show.html.haml similarity index 97% rename from app/views/campaigns/show.html.haml rename to app/views/fundraising/campaigns/show.html.haml index c01d11ce..39d0560e 100644 --- a/app/views/campaigns/show.html.haml +++ b/app/views/fundraising/campaigns/show.html.haml @@ -125,4 +125,7 @@ - content_for :javascripts do = javascript_include_tag 'https://checkout.stripe.com/checkout.js', - 'static/donate.js' + 'fundraising/campaigns/show' + +- content_for :stylesheets do + = stylesheet_link_tag 'fundraising/campaigns/show' diff --git a/app/views/donation_mailer/thank_you_email.html.erb b/app/views/fundraising/donation_mailer/thank_you_email.html.erb similarity index 100% rename from app/views/donation_mailer/thank_you_email.html.erb rename to app/views/fundraising/donation_mailer/thank_you_email.html.erb diff --git a/app/views/donations/show.html.haml b/app/views/fundraising/donations/show.html.haml similarity index 92% rename from app/views/donations/show.html.haml rename to app/views/fundraising/donations/show.html.haml index 7e23851e..897a22ed 100644 --- a/app/views/donations/show.html.haml +++ b/app/views/fundraising/donations/show.html.haml @@ -43,4 +43,7 @@ - content_for :javascripts do = include_javascript_libraries :jquery - = javascript_include_tag 'donations/show.js' + = javascript_include_tag 'fundraising/donations/show' + +- content_for :stylesheets do + = stylesheet_link_tag 'fundraising/donations/show' diff --git a/config/routes.rb b/config/routes.rb index 095fdaa4..7d0ec3e9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -79,13 +79,15 @@ OpenneoImpressItems::Application.routes.draw do end # Donation campaign stuff! - resources :donations, only: [:create, :show, :update] do - collection do - resources :donation_features, path: 'features', only: [:index] + scope module: "fundraising" do + resources :donations, only: [:create, :show, :update] do + collection do + resources :donation_features, path: 'features', only: [:index] + end end + resources :campaigns, only: [:show], path: '/donate/campaigns' + get '/donate' => 'campaigns#current', as: :donate end - resources :campaigns, only: [:show], path: '/donate/campaigns' - get '/donate' => 'campaigns#current', as: :donate # Static pages! get '/terms', as: :terms,