houdini/app/models/campaign_template.rb
Kasia Jarmołkowicz b99f7959ce Add CampaignTemplate
Read S3 bucket name and AWS region from env

Add /postgres-data to .gitignore

Custom campaign layout

Adjust custom layout

wip fix wizard init on campaign page

wip adjust design

adjust campaigner profile section

wider banner, fix button colours

Fix custom layout

Add custom_layout to nonprofit and render, if exists

Fallback profile picture

wip
2018-11-21 11:00:44 -06:00

24 lines
638 B
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

class CampaignTemplate < ActiveRecord::Base
# these are very arbitrary names some are attrs of campaign, some are not
# might be a good idea to get the default list from settings
CUSTOMIZABLE_ATTR = %i(goal_amount_dollars campaigner_photo reason_for_supporting)
attr_accessible \
:template_name,
:name, # refers to campaign name
:tagline,
:goal_amount,
:main_image,
:remove_main_image, # for carrierwave
:video_url,
:vimeo_video_id,
:youtube_video_id,
:summary,
:body
has_many :campaigns
def customizable_attribute?(attribute_name)
CUSTOMIZABLE_ATTR.include? attribute_name.to_sym
end
end