Dec 23

Date published: 12-23-2013

Rails version: 4.0.0

Enumeration

One tool that programmers use fairly often to store information is the enumeration. It’s most often used to store the state of objects in the model so the program knows how to interpret other data in that model. As common as enumerations are, it’s surprising that Rails doesn’t have a standard for handling it. In this tutorial, we’ll learn how to create an enumeration that follows Rails conventions and symbols. Continue reading »

Tagged with:
Dec 09

Date published: 12-9-2013

Rails version: 4.0.0

URLs and readability

One consideration when creating web sites with Rails that a developer should consider is how easy it is to navigate the site. One convention Rails uses for URLs is to have a path that includes the name of the class from the model along with the id of whichever specific item we want to look at. This is great for Rails as it makes it obvious which item we want to search for in our model, but from a human readability standpoint it’s not that great. This tutorial will show you what to add to your application to make your URLs more readable.

Pretty URLs

Pretty URLs

Continue reading »

Tagged with:
preload preload preload