147939b7fc
* upstream/master: (192 commits) Minor edits Job details won't scroll horizontally to show long lines Bring back branches badge to main project page Inserts exact matches of username, email and name to the top of the user search list Limit OpenGraph image size to 64x64 Improve changelog Split up MergeRequestsController Add parent_id back to the tests Make changelog more descriptive Update README.md to reflect where "Secret variables" are located Improve tests text Rename members_count to members_count_with_descendants and expose only to group admins Fix a bug where an invalid sort param value was passed to Gitaly Drop default ORDER scope when calling a find method on a Sortable model Add tests for project import state transition: [:started] => [:finished] Add CHANGELOG Perform housekeeping only when an import of a fresh project is completed Strip trailing whitespace in relative submodule URL Adjust projects spec on namespace fields Add "members_count" and "parent_id" data on namespaces API ...
12 lines
262 B
Ruby
12 lines
262 B
Ruby
module Ci
|
|
class Variable < ActiveRecord::Base
|
|
extend Ci::Model
|
|
include HasVariable
|
|
|
|
belongs_to :project
|
|
|
|
validates :key, uniqueness: { scope: [:project_id, :environment_scope] }
|
|
|
|
scope :unprotected, -> { where(protected: false) }
|
|
end
|
|
end
|