Alternate CSS for scaffold?


#1

Does anyone have an alternate CSS for the default scaffold that makes
it look decent? Would you be willing to share it? Eventually I’ll
create my own scaffold generator but in the mean time, I’d like to be
able to demo Rails to folks without the forms looking so 1994.


#2

heh… now that I’m trying to do it myself I realize I was asking the
impossible. Let me change my question: Has anyone created an updated
scaffold generator (designed to be actually used as a generator, as
opposed to ActiveScaffold and its ilk) with more CSS-friendly output?


#3

Hi Mark,

Mark T. wrote:

Has anyone created an updated scaffold generator
(designed to be actually used as a generator, as
opposed to ActiveScaffold and its ilk) with more
CSS-friendly output?

Have you seen Richard W.'s Ajax Scaffold Generator? It’s at
http://rubyforge.org/projects/ajaxscaffold/. There’s a short review /
tutorial at
http://www.height1percent.com/articles/2006/02/21/on-the-new-ajax-scaffold-generator.
I haven’t used it yet but it looks very interesting.

hth,
Bill


#4

On Mar 22, 9:44 am, “Bill W.” removed_email_address@domain.invalid wrote:

Hi Mark,

Mark T. wrote:

Has anyone created an updated scaffold generator
(designed to be actually used as a generator, as
opposed to ActiveScaffold and its ilk) with more
CSS-friendly output?

Have you seen Richard W.'s Ajax Scaffold Generator?

Yes, AjaxScaffold is being replaced by ActiveScaffold. I’ve used it
and it’s great as a drop-in admin console. But it’s not meant to be
used as a generator–it’s big and complicated, not easy to go in and
modify.

I was really looking for something in the spirit of this:
http://www.tonyspencer.com/2007/03/01/custom-scaffolding-for-rails/
except more CSS-friendly with a nice CSS stylesheet.


#5

the templates used by the scaffold generator are located here:

rails-1.2.2/lib/rails_generator/generators/components/scaffold/templates

you could just modify the rhtml and css files. one layout, 6 (very
small) views and 1 css. you could probably whip something up in short
order.

don’t forget to backup the originals :slight_smile:


#6

If you want to use the haml plugin, there are a couple of generators
at:
http://groups.google.com/group/haml/files
one, ‘haml_dry_scaffold’ has CSS imported from Ed Moss’s DryScaffold.
-Larry

On 3/22/07, Mark T. removed_email_address@domain.invalid wrote:

opposed to ActiveScaffold and its ilk) with more
http://www.tonyspencer.com/2007/03/01/custom-scaffolding-for-rails/
except more CSS-friendly with a nice CSS stylesheet.


Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson


#7

On Mar 22, 2:14 pm, “Chris H.” removed_email_address@domain.invalid wrote:

the templates used by the scaffold generator are located here:

rails-1.2.2/lib/rails_generator/generators/components/scaffold/templates

you could just modify the rhtml and css files. one layout, 6 (very
small) views and 1 css. you could probably whip something up in short
order.

Yes, this is my backup plan. I was hoping someone would have done this
already and made it available to others. I’m surprised nobody seems to
have done this.

  • Mark.