diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-30 11:56:15 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-30 11:56:15 +0200 |
commit | b8066e2cd0c8ae8384b68c81ea3a6c071cd44c51 (patch) | |
tree | 6d2df4afbcfc335ac5dcb4b3ab3877e441827360 /app/models | |
parent | 72c552c2d4ea985a9ab1470ba2e44fc7e52673d9 (diff) | |
download | gitlab-ce-b8066e2cd0c8ae8384b68c81ea3a6c071cd44c51.tar.gz |
No more web url
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/group.rb | 5 | ||||
-rw-r--r-- | app/models/project.rb | 3 | ||||
-rw-r--r-- | app/models/user.rb | 5 |
3 files changed, 1 insertions, 12 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 885d3b1e5ab..cfb8faa1491 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -17,7 +17,6 @@ require 'carrierwave/orm/activerecord' require 'file_size_validator' class Group < Namespace - include Rails.application.routes.url_helpers include Referable has_many :group_members, dependent: :destroy, as: :source, class_name: 'GroupMember' @@ -63,10 +62,6 @@ class Group < Namespace end end - def web_url - group_url(self) - end - def owners @owners ||= group_members.owners.map(&:user) end diff --git a/app/models/project.rb b/app/models/project.rb index 2d029962557..99be170731b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -36,7 +36,6 @@ class Project < ActiveRecord::Base include Gitlab::ConfigHelper include Gitlab::ShellAdapter include Gitlab::VisibilityLevel - include Rails.application.routes.url_helpers include Referable include Sortable @@ -316,7 +315,7 @@ class Project < ActiveRecord::Base end def web_url - namespace_project_url(self.namespace, self) + Rails.application.routes.url_helpers.namespace_project_url(self.namespace, self) end def web_url_without_protocol diff --git a/app/models/user.rb b/app/models/user.rb index 6dd2271abe2..4a10520b209 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -67,7 +67,6 @@ class User < ActiveRecord::Base include Gitlab::ConfigHelper include Gitlab::CurrentSettings - include Rails.application.routes.url_helpers include Referable include Sortable include TokenAuthenticatable @@ -638,10 +637,6 @@ class User < ActiveRecord::Base end end - def web_url - user_url(self) - end - def all_emails [self.email, *self.emails.map(&:email)] end |