2 Newb Questions

Xavias
Mon, 26 Feb 2007 01:53:55 -0000

Hey guys i''m new to rails and had 2 easy questions.

First i''m using a simple ajax feature and need to use a hidden variable
for my values instead of the @ruby variables (example code below)

    <%= form_remote_tag :url => {:action =>
''newlist'', :store => ''btc'',
:today => ''02/25/2007''}, :update =>
''mainfrm'',
  :complete => visual_effect(:bind_down, ''mainfrm''),
  :before   => %(Element.show(''spinner'')),
  :success  => %(Element.hide(''spinner'')) %>

where i have :store => ''btc'', :today =>
''02/25/2007'' - i need to use a
hidden field id but can''t find much on the correct syntax for this. Can
anyone help or point me to a good url?

Second i need to figure out how to loop and display only select fields
from my table instead of All the fields.

<% for entry in @entries %> <% for column in
Entry.content_columns
%> <%=h entry.send(column.name) %>

Anyone on this? i''m sure it''s yet another newb question but i
seem to be
lacking some good google skills on this one also ...

Thanks for the help if anyone replies