remove unused mk_permission functions
This commit is contained in:
parent
e0d7f2b133
commit
8a3b4983d4
2 changed files with 6 additions and 13 deletions
|
@ -38,10 +38,6 @@ class Map < ApplicationRecord
|
|||
topicmappings.or(synapsemappings)
|
||||
end
|
||||
|
||||
def mk_permission
|
||||
Perm.short(permission)
|
||||
end
|
||||
|
||||
def contributors
|
||||
User.where(id: mappings.map(&:user_id).uniq)
|
||||
end
|
||||
|
|
|
@ -125,15 +125,12 @@ class Topic < ApplicationRecord
|
|||
"Get: #{name}"
|
||||
end
|
||||
|
||||
def mk_permission
|
||||
Perm.short(permission)
|
||||
end
|
||||
|
||||
protected
|
||||
def create_metamap?
|
||||
if link == '' and metacode.name == 'Metamap'
|
||||
@map = Map.create({ name: name, permission: permission, desc: '', arranged: true, user_id: user_id })
|
||||
self.link = Rails.application.routes.url_helpers.map_url(:host => ENV['MAILER_DEFAULT_URL'], :id => @map.id)
|
||||
end
|
||||
|
||||
def create_metamap?
|
||||
if link == '' and metacode.name == 'Metamap'
|
||||
@map = Map.create({ name: name, permission: permission, desc: '', arranged: true, user_id: user_id })
|
||||
self.link = Rails.application.routes.url_helpers.map_url(:host => ENV['MAILER_DEFAULT_URL'], :id => @map.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue