Sha256: 93901b1465ef549773d7c69b2c0370681f8ca89d1ed60e115b5694553ec82035
Contents?: true
Size: 1004 Bytes
Versions: 4
Compression:
Stored size: 1004 Bytes
Contents
%h1 Images %div.row %div.col-md-6 %h4 Upload Image = form_for @image, url: admin_images_path, method: :post, multipart: true do |f| = f.text_field :name, placeholder: 'give your image a title', class: 'form-control' = f.file_field :file, class: 'form-control' <br /> = f.submit 'Upload', class: 'btn btn-primary' %div.col-md-6 %h4 Image Url = form_for @image, url: admin_images_path, method: :post do |f| = f.hidden_field :is_url, value: true = f.text_field :name, placeholder: 'give your image a title', class: 'form-control' = f.text_field :file, placeholder: 'give me an image url', class: 'form-control' <br /> = f.submit 'Insert', class: 'btn btn-primary' <hr> %div.row - @images.each do |image| %div.col-md-3.col-sm-4.col-xs-6.thumbnail = image_tag image.file %p = link_to image.name, image.file = link_to 'delete', admin_image_path(image), method: :delete, class: 'btn btn-xs btn-default'
Version data entries
4 entries across 4 versions & 1 rubygems