Skip to content

Instantly share code, notes, and snippets.

@jacoby
Created March 12, 2012 00:58
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 jacoby/2018984 to your computer and use it in GitHub Desktop.
Save jacoby/2018984 to your computer and use it in GitHub Desktop.
Fun with Potatoes
# This file is app/views/movies/index.html.haml
%h1 All Movies
%table#movies
%thead
%tr
%th{ :class => @title_class }= link_to "Movie Title" , '/movies?sort=title' , :id => "title_header"
%th Rating
%th{ :class => @rel_date_class }= link_to "Release Date" , '/movies?sort=release_date' , :id => "release_date_header"
%th More Info
%tbody
- @movies.each do |movie|
%tr
%td= movie.title
%td= movie.rating
%td= movie.release_date
%td= link_to "More about #{movie.title}", movie_path(movie)
= link_to 'Add new movie', new_movie_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment