lib/polygallery/has_polyphotos.rb in polygallery-0.3.0 vs lib/polygallery/has_polyphotos.rb in polygallery-0.3.1

- old
+ new

@@ -163,9 +163,16 @@ # puts 'Marking photo for destruction' pp.mark_for_destruction end } end + def remote_urls(style=nil); photos.map{|p| p.remote_url style } || [] end + def thumb_url; first_photo.thumb_url end + def first_photo + # TODO: some kind of selection + photos.first || Photo.new + end + end end end ActiveRecord::Base.send :include, Polygallery::HasPolyphotos