Member-only story

Styling Administrate in Rails

Steven Klavins
2 min readApr 21, 2021

Intro/Scenario

This week in my Rails development journey I have been upgrading an outdated application to Rails 6. This process involved a number of tasks such as updating the app from sprockets to webpack, updating a few deprecated methods, and last of all replacing active scaffold.

For those of you who don't know active scaffold is in a sense a predecessor of Rails Administrate, like Administrate active scaffold allows you to perform typical CRUD actions on a database through a nifty user-friendly UI. Seems pretty straight forward right? Add the gem, run the install, remove the old stuff, and good to go? Yes! But….

Once I had Administrate up and running, I noticed something kind of irritating about the table, all the columns were squished up and it was hardly readable. Being a Rails and Admistrate noob I figured “I’ll just inspect the dashboard, target the specific class and override it through the application.scss.css”

Nope, that doesn't work…

“Oh, Administrate lets you generate custom layouts?”…. Nope, no CSS customization working here.

After finding nothing in the documentation I turned to every developer's favourite site Stack overflow… Use rails generate administrate:assets:stylesheets they said. “Odd they didn’t include that in the documentation I…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Steven Klavins
Steven Klavins

Written by Steven Klavins

Hi, I’m Steven, most call me Steve! I’m a programmer, musician, and artist. This blog contains various tutorials and posts related to software development.

No responses yet

Write a response