diff --git a/app/models/campaign.rb b/app/models/campaign.rb index ab7605d8..9570760e 100644 --- a/app/models/campaign.rb +++ b/app/models/campaign.rb @@ -34,7 +34,8 @@ class Campaign < ActiveRecord::Base :receipt_message, # text :hide_custom_amounts, # boolean :parent_campaign_id, - :reason_for_supporting + :reason_for_supporting, + :default_reason_for_supporting validate :end_datetime_cannot_be_in_past, :on => :create validates :profile, :presence => true @@ -177,4 +178,12 @@ class Campaign < ActiveRecord::Base excluded_for_peer_to_peer.push(customizable_attributes_list) attributes.except(*excluded_for_peer_to_peer) end + + def user_reason_for_supporting + if reason_for_supporting.present? + reason_for_supporting + else + default_reason_for_supporting + end + end end diff --git a/app/views/campaigns/_new_peer_to_peer_modal.html.erb b/app/views/campaigns/_new_peer_to_peer_modal.html.erb index 7d32811d..2a83360a 100644 --- a/app/views/campaigns/_new_peer_to_peer_modal.html.erb +++ b/app/views/campaigns/_new_peer_to_peer_modal.html.erb @@ -38,18 +38,16 @@