DEV Community

Discussion on: How I replaced a Rails app with a few dozen lines of Ruby

Collapse
 
ewanslater profile image
Ewan Slater

Interesting post, and absolutely agree with the overall message "write less code and maintain less infrastructure".

Going back to the original problem - the dashboard breaking because of the schema change - did you consider using database views (at least for the dashboard)?

That way you could have made the schema change (including updated views) and the dashboard contract would have been maintained.

The scenic gem even lets you do views "the rails way".

Collapse
 
nholden profile image
Nick Holden

Thanks, Ewan! I hadn't considered database views, but that's a great point -- I'll definitely think of them the next time I encounter a similar problem.