petfreshman
petfreshman

Reputation: 523

Rails ActiveRecord hash displayed on page

I am creating a sortable list of items from my database using the railscast found here: http://railscasts.com/episodes/228-sortable-table-columns

The sorting works fine, but when the page displays, it seems to print out some sort of hash above the table according to the number items. Each unit looks something like this:

#<ActiveRecord::Relation:0x00000006f9a500>

I've checked the html code and there is nothing in it that prints anything. Is this some sort of debug statement? How do I get it to stop printing?

Upvotes: 0

Views: 138

Answers (1)

14113
14113

Reputation: 66

You are printing object, but you need only one attribute. Do something like this:

<%= your_object.YOUT_ATTRIBUTE %>

Upvotes: 1

Related Questions