Skip to content

Instantly share code, notes, and snippets.

.admin.panel
- unless @confirmation_code.nil?
- form_for(:game_citizen, :url => confirm_game_citizen_path(@game_citizen)) do |f|
%p
= f.hidden_field(:confirmation_code, :value => @confirmation_code)
= f.submit('Confirm my account!')
- content_for :secondary_column do
- if current_user
- if current_user.staff?
%p= link_to('Create Blog post', new_entry_path)
@jamesweiner
jamesweiner / gist:88718
Created April 1, 2009 14:54
entry form with beginnings of inline image uploads
.blog
#title
- unless entry_form.heading_image.nil? || !File.exist?(entry_form.heading_image.asset.path(:headline))
= image_tag(entry_form.heading_image.asset.url(:headline))
- else
= image_tag('headline_blank.png')
.image_upload
.threecolumn.noborder
- form_for(image_form, :url => assets_path, :html => {:enctype => 'multipart/form-data', :id => 'headline_image_form'}) do |f|