Skip to content

Instantly share code, notes, and snippets.

@forsaken1
Last active August 29, 2015 14:25
Show Gist options
  • Save forsaken1/cdbfdf3153ba34b87e48 to your computer and use it in GitHub Desktop.
Save forsaken1/cdbfdf3153ba34b87e48 to your computer and use it in GitHub Desktop.
Active admin tricks
form do |f|
f.has_many :images, allow_destroy: true, new_record: true do |fi|
fi.input :file, as: :file, hint: (f.template.image_tag(f.object.file.url(:small)) if f.object.file.present?)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment