Iβm kind of new to Ruby on Rails and studied well, but it seems to have run into a problem that I canβt solve.
Running Rails 3.0.9 and Ruby 1.9.2
In my view, I run the following statement:
<%= @events.each do |f| %> <%= f.name %><%= link_to "View", event_path(f) %><br/><hr/> <% end %>
And this is in my controller:
class AdminController < ApplicationController def flyers @events = Event.all end end
This goes through each of the records and displays the corresponding name, but the problem is that in the end it displays all the information for all the records, for example:
[#<User id: 1, username: "test account", email: " test@gmail.com ", password_hash: "$2a$10$Rxwgy.0ZEOb0lMGEIliPBeB/jPSp8roeKdbMvXcLi32R...", password_salt: "$2a$10$Rxwgy.0ZEOb0lMGEIliPBe", created_at: 2111359287.2303703, updated_at: 2111359287.2303703, isadmin: true>]
I am new to this site, so I'm not sure if you need more information, but any help is appreciated, in the end I am still involved.
Thanks in advance.
Amzziipan
source share