diff --git a/app/controllers/v1/admin/events_controller.rb b/app/controllers/v1/admin/events_controller.rb index f68b7b3..c865f7c 100644 --- a/app/controllers/v1/admin/events_controller.rb +++ b/app/controllers/v1/admin/events_controller.rb @@ -47,6 +47,7 @@ def creatable_attributes confirmation_email_subject confirmation_email_body confirmation_email_bcc + website ] end diff --git a/app/models/event.rb b/app/models/event.rb index 8a21599..e6228b3 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -17,6 +17,7 @@ # has_registration_form :boolean # name :string # start_date :string +# website :string # created_at :datetime not null # updated_at :datetime not null # country_id :string diff --git a/app/serializers/v1/admin/event_serializer.rb b/app/serializers/v1/admin/event_serializer.rb index c0f8dc0..93e25db 100644 --- a/app/serializers/v1/admin/event_serializer.rb +++ b/app/serializers/v1/admin/event_serializer.rb @@ -14,7 +14,8 @@ class EventSerializer < ApplicationSerializer :ask_company, :confirmation_email_subject, :confirmation_email_body, - :confirmation_email_bcc + :confirmation_email_bcc, + :website belongs_to :country diff --git a/app/serializers/v1/public/event_serializer.rb b/app/serializers/v1/public/event_serializer.rb index 70fbde7..b372e40 100644 --- a/app/serializers/v1/public/event_serializer.rb +++ b/app/serializers/v1/public/event_serializer.rb @@ -11,7 +11,8 @@ class EventSerializer < ApplicationSerializer :ask_first_name, :ask_last_name, :ask_role, - :ask_company + :ask_company, + :website belongs_to :country end diff --git a/db/migrate/20240419091308_add_website_to_event.rb b/db/migrate/20240419091308_add_website_to_event.rb new file mode 100644 index 0000000..c611b13 --- /dev/null +++ b/db/migrate/20240419091308_add_website_to_event.rb @@ -0,0 +1,5 @@ +class AddWebsiteToEvent < ActiveRecord::Migration[6.1] + def change + add_column :events, :website, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 8b2f4af..0da32a4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_04_18_113914) do +ActiveRecord::Schema.define(version: 2024_04_19_091308) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -275,6 +275,7 @@ t.string "confirmation_email_subject", default: "See you soon at {event_name}!" t.string "confirmation_email_body", default: "Hello {first_name} {last_name}, We look forward seeing you at {event_name} on {event_date} in {event_location}. Best regards, The Interflux Electronics team" t.string "confirmation_email_bcc", default: "s.teliszewski@interflux.com, jw@interflux.au" + t.string "website" end create_table "features", primary_key: "slug", id: :string, force: :cascade do |t| diff --git a/test/fixtures/events.yml b/test/fixtures/events.yml index 7d4f287..edae933 100644 --- a/test/fixtures/events.yml +++ b/test/fixtures/events.yml @@ -17,6 +17,7 @@ # has_registration_form :boolean # name :string # start_date :string +# website :string # created_at :datetime not null # updated_at :datetime not null # country_id :string