Hi, just followed this tutorial
http://media.rubyonrails.org/video/rails_take2_with_sound.mov, and loved
it. Now have the skeleton of a blog engine, and starting to customize it
and make it my own. If I show you what code I had before that worked,
and show how I changed it, perhaps you can explain why it no longer
works!
(If there is a more suitable group for beginners, please let me know.)
Before:
Comments
<% for comment in @post.comments %>
<%= comment.name %> says: <%= comment.body %>
<% end %>
After:
Comments
<% for comment in @post.comments %>
<%= if comment.website then %>
<%= comment.name %> says:
<%= comment.body %>
<%= else %>
<%= comment.name %> says: <%= comment.body %>
<%= end %>
<% end %>
I have tried to add a simple conditional to add a link to the persons
name. All these things are in a database called comments.
Any ideas? Must be simple. These are in an rhtml file, hence all the <%=
%> - I might need more of those I reckon, but not sure where!
Thanks for your help!