remove unused mk_permission functions

This commit is contained in:
Devin Howard 2016-12-02 17:27:08 -05:00
parent e0d7f2b133
commit 8a3b4983d4
2 changed files with 6 additions and 13 deletions

View file

@ -38,10 +38,6 @@ class Map < ApplicationRecord
topicmappings.or(synapsemappings) topicmappings.or(synapsemappings)
end end
def mk_permission
Perm.short(permission)
end
def contributors def contributors
User.where(id: mappings.map(&:user_id).uniq) User.where(id: mappings.map(&:user_id).uniq)
end end

View file

@ -125,15 +125,12 @@ class Topic < ApplicationRecord
"Get: #{name}" "Get: #{name}"
end end
def mk_permission
Perm.short(permission)
end
protected protected
def create_metamap?
if link == '' and metacode.name == 'Metamap' def create_metamap?
@map = Map.create({ name: name, permission: permission, desc: '', arranged: true, user_id: user_id }) if link == '' and metacode.name == 'Metamap'
self.link = Rails.application.routes.url_helpers.map_url(:host => ENV['MAILER_DEFAULT_URL'], :id => @map.id) @map = Map.create({ name: name, permission: permission, desc: '', arranged: true, user_id: user_id })
end self.link = Rails.application.routes.url_helpers.map_url(:host => ENV['MAILER_DEFAULT_URL'], :id => @map.id)
end end
end
end end