Skip to content
Snippets Groups Projects
Commit 59f75e6c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Remove unused accessor

parent 0bc714c2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -92,7 +92,6 @@ class ProjectTeam
new_tm = tm.dup
new_tm.id = nil
new_tm.project_id = target_project.id
new_tm.skip_git = true
new_tm
end
 
Loading
Loading
Loading
Loading
@@ -25,8 +25,6 @@ class UsersProject < ActiveRecord::Base
belongs_to :user
belongs_to :project
 
attr_accessor :skip_git
validates :user, presence: true
validates :user_id, uniqueness: { scope: [:project_id], message: "already exists in project" }
validates :project_access, inclusion: { in: [GUEST, REPORTER, DEVELOPER, MASTER] }, presence: true
Loading
Loading
@@ -77,7 +75,6 @@ class UsersProject < ActiveRecord::Base
user_ids.each do |user_id|
users_project = UsersProject.new(project_access: project_access, user_id: user_id)
users_project.project_id = project_id
users_project.skip_git = true
users_project.save
end
end
Loading
Loading
@@ -92,7 +89,6 @@ class UsersProject < ActiveRecord::Base
UsersProject.transaction do
users_projects = UsersProject.where(project_id: project_ids)
users_projects.each do |users_project|
users_project.skip_git = true
users_project.destroy
end
end
Loading
Loading
@@ -130,8 +126,4 @@ class UsersProject < ActiveRecord::Base
end
 
alias_method :human_access, :project_access_human
def skip_git?
!!@skip_git
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment