osem-fcy/app/models/sponsor.rb
Emanuel Hayford e5587d42a2 Enable Rails/Validation Rubocop cop
Cop checks for the use of old-style attribute validation. Supports autocorrection which was run
to fix the files concerned

Closes #1414
2017-03-28 21:47:31 +02:00

10 lines
318 B
Ruby

class Sponsor < ActiveRecord::Base
belongs_to :sponsorship_level
belongs_to :conference
has_paper_trail ignore: [:updated_at], meta: { conference_id: :conference_id }
mount_uploader :picture, PictureUploader, mount_on: :logo_file_name
validates :name, :website_url, :sponsorship_level, presence: true
end