Skip to content

Instantly share code, notes, and snippets.

@marti1125
Created February 21, 2013 22:07
Show Gist options
  • Save marti1125/5008778 to your computer and use it in GitHub Desktop.
Save marti1125/5008778 to your computer and use it in GitHub Desktop.
Index YAML
%h1 Images
if @images.count == 0
%h3 You have no images
@images.each do |image|
%h2
%a{href: "/images/#{image.id}"}=image[:title]
%p
%img{src: image[:url], width: 40}
%blockquote=image[:description]
%h2 Store a new image
%form.row(action="/images" method="post")
%p.six.columns
%label Title
%input(type="text" placeholder="Enter a title" name="image[title]")
%p.six.columns
%label URL
%input(type="url" placeholder="Enter a url" name="image[url]")
%p.twelve.columns
%label Description
%textarea(placeholder="Enter a quick description" rows="3" name="image[description]")
%p.twelve.columns
%input.button(type="submit" value="Create image")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment