%h1 Editing Profile = form_for @user do |f| = f.error_messages = f.fields_for :profile do |p| %h3 Picture %div#image_picker = p.hidden_field :image_url, :value => @profile.image_url, :id => 'image_url_field' - for photo in @photos - if photo.image.url(:thumb_medium) == @profile.image_url %div.small_photo{:id => photo.image.thumb_medium.url, :class=>'selected'} = check_box_tag 'checked_photo', true, true = link_to image_tag(photo.image.url(:thumb_medium)), "#" - else %div.small_photo{:id => photo.image.thumb_medium.url} = check_box_tag 'checked_photo' = link_to image_tag(photo.image.url(:thumb_medium)), "#" %h3 Info %p = p.label :first_name = p.text_field :first_name, :value => @profile.first_name %p = p.label :last_name = p.text_field :last_name, :value => @profile.last_name %p = f.label :email = f.text_field :email %p = f.label :url = f.text_field :url %p = f.submit %p = link_to "Show", user_path(@user)