A less efficient, but simpler way of checking whether the photo is the profile photo

This commit is contained in:
Raphael 2010-09-22 10:31:40 -07:00
parent c87ad060ab
commit 7049cb3ca4

View file

@ -17,11 +17,11 @@
%h3 Picture
%div#image_picker
= p.hidden_field :image_url, :value => (@profile.image_url.sub(APP_CONFIG[:pod_url],'/') if @profile.image_url), :id => 'image_url_field'
= p.hidden_field :image_url, :value => (@profile.image_url if @profile.image_url), :id => 'image_url_field'
- unless @photos.nil? || @photos.empty?
- for photo in @photos
- if @profile.image_url && (photo.url(:thumb_medium) == @profile.image_url.sub(APP_CONFIG[:pod_url],'/'))
- if @profile.image_url && @profile.image_url.include?(photo.url(:thumb_medium))
%div.small_photo{:id => photo.url(:thumb_medium), :class=>'selected'}
= check_box_tag 'checked_photo', true, true
= link_to image_tag(photo.url(:thumb_medium)), "#"