mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Validation in EventSchedule
Validation to avoid scheduling the same event twice for the same schedule.
This commit is contained in:
parent
2b4bf2fff7
commit
f0a7f3c59b
3 changed files with 8 additions and 1 deletions
5
db/migrate/20160815140302_add_index_to_event_schedule.rb
Normal file
5
db/migrate/20160815140302_add_index_to_event_schedule.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class AddIndexToEventSchedule < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :event_schedules, [:event_id, :schedule_id], unique: true
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue