A less efficient, but simpler way of checking whether the photo is the profile photo
This commit is contained in:
parent
c87ad060ab
commit
7049cb3ca4
1 changed files with 2 additions and 2 deletions
|
|
@ -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)), "#"
|
||||
|
|
|
|||
Loading…
Reference in a new issue