Getting Started with Ember.js Part 2: The List View


table display cars

In the last post, we set up Rails to serve up a list of cars. Now let’s hook up Ember to display that data.

Read More

Getting Started with Ember.js Part 1: Project Setup


Tomster greeting in the browser

Shortly after sitting down to try and learn Ember.js, I learned that Ember has a “Getting Started Problem.” Everything in the docs seems reasonable, but when you go to make a real world application with a real web server, you realize there are a lot of gaps. Each individual component is well documented, but gluing them together proved to be an exercise in frustration. There are not very many examples of best practices within the context of a real application, instead of a single page to-do app. In this post I’ll take you through making a single CRUD resource. I’ll use a toy example of a car database, from which you can create, read, update and delete cars. We’ll be going through a typical Rails application to serve up JSON using Active Model Serializers to feed the client side application using Ember.js and Ember Data.

Read More

Continuous Testing in Rails using Guard and MiniTest


Test Case with success notification

Testing is important in any software project. The faster the code is tested and the shorter the feedback cycle, the better. Here’s how to set up Guard and Guard::MiniTest to provide notifications for the fastest feedback loop possible. Anytime a file watched by Guard is saved it will run the test suite and pop up a notification. Head past the break for the details

Read More

Adding a Drop-down List in Rails with a Foreign Key


Setting up a foreign key relationship in Rails is easy, however, the form for the relationship proved to be a bit tricky. Ideally, you want the foreign key to be selected if it’s set in the show view and you want it to save in the new and edit views. Here is how to make that happen.

Read More