After completing the very comprehensive and freely available Hartl Rails Tutorial, I decided to quickly put together a super simple Rails app to revise the basics.
I mostly wanted to practice setting up a new Rails app and deploying it to Heroku. I could have done this with the standard Rails template application, but wanted it also to be something useful.
Over the course of a couple of hours last night (most of it spent rediscovering relevant commands in my notes, or Googling a weird bug) I created a Property Yield Calculator.
It’s only a single static page, but it’s using a StaticPages controller rather than just delivering a pure HTML file.
In the end I’m pleased with the result. It may be just a single static page, but I developed it from nothing in Rails and I’ve already found at least one person who finds it very useful.
What did I learn?
- Using routes and controllers to deliver static pages
- Responsive design (to an extent). The design adapts fairly nicely to screen size and the ‘How to use’ box isn’t shown at all on small screens
- Heroku idles a single dyno app after a short time, so it may take 10-15 seconds to load an app
The source code is freely available to use and adapt on Github