b99f7959ce
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
24 lines
638 B
Ruby
24 lines
638 B
Ruby
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
|