Posts Tagged “rails”
Modern JavaScript in Rails
Over the past year, JavaScript has matured quite a bit with the latest additions to the spec in ES2015/ES6. With these improvements, JS tooling has also benefited and tools like babel allow developers begin writing ES2015, even before browsers fully support it. Meanwhile, Ruby on Rails, where CoffeeScript is still...
Database Associations- "Has One" vs "Belongs To"
Which One Goes Where? One of the most confusing database relationship questions for me was always when to use has_one vs belongs_to. The relationship is a simple one-to-one relationship, and if we think about it in terms of the models, it makes a lot of sense. For example, let's say...