Forum: Ruby on Rails column.name question....

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rob B. (Guest)
on 2006-04-10 20:18
rHTML is

<% for column in Wizard.content_columns %>
<p>
  <%=h @wizard.send(column.name) %>
</p>
<% end %>


It outputs:

Robs Site

Heading

logo.jpeg

London

------

Bascally 1 line for each column in the database.  How do I edit the
rhtml so I can break up the output?
For instance JUST have 'Robs Site' display nothing else.  That mysql
column is called user_name
Edward F. (Guest)
on 2006-04-10 20:40
(Received via mailing list)
Rob,

You can just skip the 'reflection' part:

<p><%=h @wizard.user_name %></p>


--

Ed Frederick -- edwardfrederick.com
This topic is locked and can not be replied to.