diff --git a/app/models/registration.rb b/app/models/registration.rb index 0e5a9d44..102a4141 100644 --- a/app/models/registration.rb +++ b/app/models/registration.rb @@ -70,6 +70,7 @@ class Registration < ApplicationRecord def user_has_registration_ticket return if TicketPurchase.where(user: user, ticket: conference.registration_tickets).paid.any? + errors.add(:base, 'You must purchase a registration ticket before registering') if TicketPurchase.where(user: user, ticket: conference.registration_tickets).unpaid.any? errors.add(:base, 'You currently have a ticket with an unfinished purchase') diff --git a/db/schema.rb b/db/schema.rb index b2b6ee20..e8ac08e8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -407,7 +407,7 @@ ActiveRecord::Schema.define(version: 2020_07_16_181602) do t.string "name", null: false t.integer "size" t.integer "venue_id", null: false - t.text "url" + t.string "url" t.integer "order" end