Method: CurateHelper#creator_name_from_pid

Defined in:
app/helpers/curate_helper.rb

#creator_name_from_pid(value) ⇒ Object

Loads the person object and returns their name In this case, the value is in the format: info:fedora/<PID> So used split



16
17
18
19
20
21
22
23
# File 'app/helpers/curate_helper.rb', line 16

def creator_name_from_pid value
  begin
    p = Person.load_instance_from_solr(value.split("/").last)
  rescue => e
    logger.warn("WARN: Helper method create_name_from_pid raised an error when loading #{value}.  Error was #{e}")
  end
  return p.nil? ? value : p.name
end