FreelanceWebDesigner.com
2006-Jul-16 17:49 UTC
[Rails] Can scaffold do tall tables instead of wide?
I''m trying to get data in rows instead of columns by default. The default scaffold behavior is to create an initial table layout with column headers along the top. In some cases this creates really wide tables which require horizontal scrolling. Is there a parameter I can use with scaffolding or a hack to get the header cells along the left side of the table instead? I''m eventually going to generate scaffolds then do some design on them using Dreamweaver and wish there was an easy way to convert the default wide table layouts to tall as a starting point. Thanks, DAN -- Posted via http://www.ruby-forum.com/.
Dan, I think what you might want to do is extend the ScaffoldGenerator object and create your own scaffold behavior and code. I Googled around for a bit for a nice place to learn how to do this and came across this: http://www.bigbold.com/snippets/posts/show/447 Hopefully that will help you learn how to create your own custom generator which you can use in many future projects so that scaffolds match your style of design and code. Hope this helps, Rick On 7/16/06, FreelanceWebDesigner.com <daniel@freelancewebdesigner.com> wrote:> I''m trying to get data in rows instead of columns by default. > > The default scaffold behavior is to create an initial table layout with > column headers along the top. In some cases this creates really wide > tables which require horizontal scrolling. Is there a parameter I can > use with scaffolding or a hack to get the header cells along the left > side of the table instead? > > I''m eventually going to generate scaffolds then do some design on them > using Dreamweaver and wish there was an easy way to convert the default > wide table layouts to tall as a starting point. > > Thanks, > DAN > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
To add to what Rick said, there''s also a recipe in Chad Fowler''s "Rails Recipes" on developing your own generators and the example is concerned with forms. hth, Bill Rick Martinez wrote:> Dan, > > I think what you might want to do is extend the ScaffoldGenerator > object and create your own scaffold behavior and code. I Googled > around for a bit for a nice place to learn how to do this and came > across this: > > http://www.bigbold.com/snippets/posts/show/447 > > Hopefully that will help you learn how to create your own custom > generator which you can use in many future projects so that scaffolds > match your style of design and code. > > Hope this helps, > Rick > > On 7/16/06, FreelanceWebDesigner.com <daniel@freelancewebdesigner.com> > wrote: >> I''m trying to get data in rows instead of columns by default. >> >> The default scaffold behavior is to create an initial table layout with >> column headers along the top. In some cases this creates really wide >> tables which require horizontal scrolling. Is there a parameter I can >> use with scaffolding or a hack to get the header cells along the left >> side of the table instead? >> >> I''m eventually going to generate scaffolds then do some design on them >> using Dreamweaver and wish there was an easy way to convert the default >> wide table layouts to tall as a starting point. >> >> Thanks, >> DAN >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >