Created
March 12, 2012 00:58
-
-
Save jacoby/2018984 to your computer and use it in GitHub Desktop.
Fun with Potatoes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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