hi guys, I have a table in which there are 7 column. I have select all data from the table but in the time of display I want to display last 5 column(just hide first 2 column) The following code display all data(7 column): <table> <% for file_data in @file_datas %> <tr> <% for column in FileData.content_columns %> <td width="14%" class="infotable_align"><%=h file_data.send(column.name) %></td> <% end %> </tr> <% end %> <table> How can i do this. please help me. Sasaki -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2007-Feb-23 15:52 UTC
Re: Data display problem.. small question from a newbie
> > hi guys, > I have a table in which there are 7 column. > I have select all data from the table but in the time of display > I want to display last 5 column(just hide first 2 column) > The following code display all data(7 column): > <table> > <% for file_data in @file_datas %> > <tr> > <% for column in FileData.content_columns %><% for column in FileData.content_columns[2 .. FileData.content_columns.length] %>> <td width="14%" class="infotable_align"><%=h > file_data.send(column.name) %></td> > <% end %> > </tr> > <% end %> > <table> > > How can i do this. please help me. > > Sasaki > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---