Sponsor dashboard added, with sponsor component for splash page
This commit is contained in:
parent
643b8b173a
commit
ea119a8158
36 changed files with 549 additions and 12 deletions
|
|
@ -9,5 +9,10 @@ FactoryGirl.define do
|
|||
contact_email 'admin@example.com'
|
||||
start_date Date.today
|
||||
end_date Date.tomorrow
|
||||
factory :conference_with_sponsorship_level do
|
||||
after(:build) do |conference|
|
||||
conference.sponsorship_levels << build(:sponsorship_level, conference: conference)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
9
spec/factories/organizations.rb
Normal file
9
spec/factories/organizations.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :organization do
|
||||
title 'Example Organization'
|
||||
sequence(:email_id) { |n| "example#{n}@example.com" }
|
||||
website_url 'www.example.com'
|
||||
end
|
||||
end
|
||||
9
spec/factories/sponsorship_levels.rb
Normal file
9
spec/factories/sponsorship_levels.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :sponsorship_level do
|
||||
title 'Platin'
|
||||
description 'Lorem Ipsum'
|
||||
conference
|
||||
end
|
||||
end
|
||||
19
spec/factories/sponsorship_registrations.rb
Normal file
19
spec/factories/sponsorship_registrations.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :sponsorship_registration do
|
||||
name 'Example Person'
|
||||
sequence(:email_id) { |n| "example#{n}@example.com" }
|
||||
contact_no '90000000000'
|
||||
amount_donated '$1,00,000'
|
||||
method_of_donation 'Cheque'
|
||||
conference
|
||||
sponsorship_level
|
||||
organization
|
||||
after(:build) do |sponsorship_registration|
|
||||
sponsorship_registration.sponsorship_level =
|
||||
build(:sponsorship_level,
|
||||
conference: sponsorship_registration.conference)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
FactoryGirl.define do
|
||||
factory :user do
|
||||
email 'example@example.com'
|
||||
sequence(:email) { |n| "example#{n}@example.com" }
|
||||
password 'changeme'
|
||||
password_confirmation 'changeme'
|
||||
confirmed_at Time.now
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue