Created
February 20, 2015 21:02
-
-
Save iheartkode/8747bbef8245a0896caa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Showing C:/Sites/rails_studio/flix/app/views/movies/index.html.erb where line #16 raised: | |
undefined method `>' for nil:NilClass | |
<td><%= time_ago_in_words(movie.released_on) %> ago</td> |
This file contains hidden or 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
<h1><%= pluralize(@movies.size, 'Movie') %></h1> | |
<% @movies.each do |movie| %> | |
<article> | |
<header> | |
<h2><%= movie.title %></h2> | |
</header> | |
<p> | |
<%= truncate(movie.description, length: 40, separator: ' ') %> | |
</p> | |
<table> | |
<tr> | |
<th>Released:</th> | |
<td><%= movie.released_on %></td> | |
</tr> | |
<td><%= time_ago_in_words(movie.released_on) %> ago</td> # When I add time_ago_in_words() I get the error I post below | |
<th>Rating:</th> | |
<td><%= movie.rating %></td> | |
</tr> | |
<tr> | |
<th>Total Gross:</th> | |
<td><%= number_to_currency(movie.total_gross) %></td> | |
</tr> | |
</table> | |
</article> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment