metamaps--metamaps/app/models/follow_reason.rb

14 lines
313 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-11-25 19:23:47 +00:00
class FollowReason < ApplicationRecord
REASONS = %w[created commented contributed followed shared_on starred].freeze
belongs_to :follow
2017-11-25 19:23:47 +00:00
validates :follow, presence: true
2017-11-25 19:23:47 +00:00
def has_reason
created || commented || contributed || followed || shared_on || starred
end
2017-11-25 19:23:47 +00:00
end