I have a products table created in active scaffold and html table display is fine.But the product descriptions are too long for some products and it stretches the html TD cell. Now I want to limit the TD height and make the rest of description content hidden by adding <div style="height:30px; overflow:hidden"> </div> to the TD contents. That is: ...<td><div style="height:30px; overflow:hidden">Product_descriptions</div></td> My question is how I can do this customization? TIA, Daniel -- 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 -~----------~----~----~----~------~----~------~--~---
Daniel Zane
2008-Jul-09 18:22 UTC
Re: How to set row height in active scaffold html table?
I figure this out by myself: module ProductsHelper $tag_start = "<div style=''height: 30px; overflow: auto;''>" $tag_end = "</div>" def description_column(record) description = $tag_start + record.description description += $tag_end end end -- 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 -~----------~----~----~----~------~----~------~--~---