# Simple dumb rails from datastore question

**URL:** <https://www.ruby-forum.com/t/simple-dumb-rails-from-datastore-question/151520>\
**Category:** Rails\
**Created:** [October 22, 2008, 11:44am UTC](https://www.ruby-forum.com/t/simple-dumb-rails-from-datastore-question/151520 "2008-10-22T11:44:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cogrady2k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@cogrady2k](https://www.ruby-forum.com/u/cogrady2k)\
**Post date:** [October 22, 2008, 11:44am UTC](https://www.ruby-forum.com/t/simple-dumb-rails-from-datastore-question/151520/1 "2008-10-22T11:44:25Z")

</div>

hi, ive just started learning rails and im trying to make a simple blog  
app

i have the following code on my index page

i can add articles ok but i cant display them

everything ive tried to put between the h1 tags fails?  
what should I put between the tags to display the data stores in the  
body and title fields

\<%= link\_to ‘New Article’, :action =\> ‘new’ %\>

\<% for article in @articles %\>

# 
 \<%= link\_to 'Show', article %\> \<%= link\_to 'Edit', edit\_article\_path(article) %\> \<%= link\_to 'Destroy', article, :confirm =\> 'Are you sure?', :method =\> :delete %\> \<% end %\>

Thanks for any help

---

<div class="post-metadata">

**Author:** ![cogrady2k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@cogrady2k](https://www.ruby-forum.com/u/cogrady2k)\
**Post date:** [October 22, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/simple-dumb-rails-from-datastore-question/151520/2 "2008-10-22T12:33:51Z")

</div>

assuming that the articles table has a title field, then

\<% @articles.each do |article| %\>

# \<%= article.title %\>
\<% end %\>

would display it.

But if I remember right, H1 tags within a table are not valid html  
You would have to put them into a TD tag I think. Maybe your  
code was right and your browser didn’t display it for that  
reason
