Invites model,controller and views are initialized. add datepicker and selectize in invites#new calender is added for end date field and selectize is added for emails field to allow multiple emails in field
8 lines
256 B
Ruby
8 lines
256 B
Ruby
class Invite < ApplicationRecord
|
|
attr_accessor :emails
|
|
belongs_to :conference
|
|
|
|
validates :end_date, presence: true
|
|
validates :invite_for, presence: true
|
|
validates :user_id, presence: true, uniqueness: { scope: [:invite_for, :conference_id] }
|
|
end
|