diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-08-07 22:44:47 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-08-07 22:44:47 -0500 |
commit | 0994bbf9dd79413b3c22381bc2d82fcc41aa13bc (patch) | |
tree | 4488184f950fb66ae761209952722bb72bf18b72 /app/models/project.rb | |
parent | 1375db509a4cd30d759d588ee85a8aec2771d78a (diff) | |
parent | 9e7ac48bc11141762816f157247baaf9e61618b3 (diff) | |
download | gitlab-ce-0994bbf9dd79413b3c22381bc2d82fcc41aa13bc.tar.gz |
Merge branch 'master' into ide
* master: (86 commits)
Show all labels
33874 confidential issue redesign
Exclude merge_jid on Import/Export attribute configuration
Resolve "User dropdown in filtered search does not load avatar on `master`"
Re-add column locked_at on migration rollback
Group-level new issue & MR using previously selected project
[EE Backport] Update log audit event in omniauth_callbacks_controller.rb
more eagerly bail when the state is prevented
Move locked_at removal to post-deployment migration
Add class to other sidebars
Improve mobile sidebar
reduce iterations by keeping a count of remaining enablers
Store & use ConvDev percentages returned by Version app
Store MergeWorker JID on merge request, and clean up stuck merges
Backport changes in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2551 to CE
DRY up caching in AbstractReferenceFilter
Update CHANGELOG
Add CHANGELOG entry
Fix html structure Removes test for removed behavior
Port form back to use form_tag
...
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 09b1305739c..e7baba2ef08 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -75,6 +75,7 @@ class Project < ActiveRecord::Base attr_accessor :new_default_branch attr_accessor :old_path_with_namespace + attr_accessor :template_name attr_writer :pipeline_status alias_attribute :title, :name @@ -163,7 +164,7 @@ class Project < ActiveRecord::Base has_many :todos has_many :notification_settings, as: :source, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent - has_one :import_data, class_name: 'ProjectImportData' + has_one :import_data, class_name: 'ProjectImportData', inverse_of: :project, autosave: true has_one :project_feature has_one :statistics, class_name: 'ProjectStatistics' @@ -192,6 +193,7 @@ class Project < ActiveRecord::Base accepts_nested_attributes_for :variables, allow_destroy: true accepts_nested_attributes_for :project_feature + accepts_nested_attributes_for :import_data delegate :name, to: :owner, allow_nil: true, prefix: true delegate :count, to: :forks, prefix: true @@ -588,8 +590,6 @@ class Project < ActiveRecord::Base project_import_data.credentials ||= {} project_import_data.credentials = project_import_data.credentials.merge(credentials) end - - project_import_data.save end def import? |