Module: TaggableQueries

Extended by:
ActiveSupport::Concern
Included in:
Ci::Runner, CommitStatus
Defined in:
app/models/concerns/taggable_queries.rb

Constant Summary collapse

MAX_TAGS_IDS =
50
TooManyTagsError =
Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#tags_idsObject



42
43
44
45
46
# File 'app/models/concerns/taggable_queries.rb', line 42

def tags_ids
  tags.limit(MAX_TAGS_IDS).order('id ASC').pluck(:id).tap do |ids|
    raise TooManyTagsError if ids.size >= MAX_TAGS_IDS
  end
end