Skip to content

Instantly share code, notes, and snippets.

@itsterry
Created September 10, 2013 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsterry/6508969 to your computer and use it in GitHub Desktop.
Save itsterry/6508969 to your computer and use it in GitHub Desktop.
How we like to put image upload on the page at the moment
=simple_form_for event do |f|
=f.input :asset_attachment, :as=>:file,:label=>"Image"
=f.input :asset_attachment_remove, :as=>:boolean, :label=>'Remove' if event.asset
=nice_asset(event.asset,:thumb95x95)
=f.input :asset_attachment_title,:label=>"Image Description", :input_html => {:value=>(event.asset ? event.asset.title : "")}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment