Created
April 26, 2012 17:07
-
-
Save Soldo/2501025 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
| this code in show.html.erb... | |
| <% @page.children.each do |child| %> | |
| <%= link_to(child) do %> | |
| <%= image_tag @page.key_image.url if @page.key_image.present? %> | |
| <h2><%= child.title %></h2> | |
| <% end %> | |
| <% end %> | |
| is producing this output without images: | |
| <a href="/pages/child-page-1"> | |
| <h2>Child page 1</h2> | |
| </a> | |
| <a href="/pages/child-page-2"> | |
| <h2>Child page 2</h2> | |
| </a> | |
| <a href="/pages/child-page-3"> | |
| <h2>Child page 3</h2> | |
| </a> | |
| Even though we're using "@page.key_image.url" href is not showing site domain. | |
| and inside <a> tag there is no image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment