Commit 634783fe authored by Andrey Kumanyaev's avatar Andrey Kumanyaev
Browse files

Rename scope "in_group" to "in_namespace"

parent ad043489f07b
......@@ -82,7 +82,7 @@ class TransferError < StandardError; end
scope :public_only, where(private_flag: false)
scope :without_user, ->(user) { where("id NOT IN (:ids)", ids: user.projects.map(&:id) ) }
scope :not_in_group, ->(group) { where("id NOT IN (:ids)", ids: group.project_ids ) }
scope :in_group, ->(group) { where(namespace_id: group.id) }
scope :in_namespace, ->(namespace) { where(namespace_id: namespace.id) }
scope :sorted_by_activity, ->() { order("(SELECT max(events.created_at) FROM events WHERE events.project_id = projects.id) DESC") }
scope :personal, ->(user) { where(namespace_id: user.namespace_id) }
scope :joined, ->(user) { where("namespace_id != ?", user.namespace_id) }
......
......@@ -76,7 +76,7 @@
%tr{class: "user_#{u.id}"}
%td.name= link_to u.name, admin_user_path(u)
%td.projects_access
- u.projects.in_group(@group).each do |project|
- u.projects.in_namespace(@group).each do |project|
- u_p = u.users_projects.in_project(project).first
= "#{project.name} (#{link_to u_p.project_access_human, edit_admin_team_member_path(u_p) })".html_safe
%tr
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment