gitlab-org--gitlab-foss/app/models/ci/trigger_request.rb
David Wagner 03b6108f6f Remove redundant class_name and foreign_key overrides
They were Rails' default and are unnecessarily overridden.

Signed-off-by: David Wagner <david@marvid.fr>
2016-10-24 22:29:48 +02:00

19 lines
369 B
Ruby

module Ci
class TriggerRequest < ActiveRecord::Base
extend Ci::Model
belongs_to :trigger
belongs_to :pipeline, foreign_key: :commit_id
has_many :builds
serialize :variables
def user_variables
return [] unless variables
variables.map do |key, value|
{ key: key, value: value, public: false }
end
end
end
end