class Gallerist::Person
This code is free software; you can redistribute it and/or modify it under the terms of the new BSD License.
Copyright © 2015, Sebastian Staudt
Public Instance Methods
inspect()
click to toggle source
# File lib/gallerist/models/person.rb, line 32 def inspect "#<%s id=%d name='%s'>" % [ self.class, id, name ] end
photos()
click to toggle source
ActiveRecord does not support has_many-through associations across different databases, so we have to query the photos manually
# File lib/gallerist/models/person.rb, line 38 def photos Gallerist::Photo.where modelId: person_photos.map(&:photo_id) end
to_s()
click to toggle source
# File lib/gallerist/models/person.rb, line 42 def to_s name end