Search code examples
ruby-on-railsstylesheetscaffoldingblueprint-css

How can you configure Rails to use blueprint-css instead of the default scaffolding css?


What changes do you need to make to a Rails project to configure blueprintcss as the default stylesheet to be used when you generate scaffolding instead of scaffold.css?


Solution

  • I'd recommend writing your own generator, but if you want to alter the default you can:

    1 - For a single app: Freeze rails and change the stylesheet the scaffold generator uses.

    railsapp/vendor/rails/railties/lib/rails_generators/generators/components/scaffold/templates/style.css

    2 - For all apps: Change the same style.css file in your systems rails installation.