Sharing the Code

Programming stuff that might be useful to others

Tag: Rails

Ember CLI and Rails in Production

I originally had my Ember app inside Rails and used Rail’s asset pipeline. I recently decided to migrate the Ember app out of Rails and into Ember CLI, which is an Ember-specific build environment. One major advantage of separating them is that deploying changes to the Ember app doesn’t require a restart of the Rails server. Below I outline how to get them working together in production.

Read more

A basic ajax form in Rails

This basic example shows you how you can submit a form without having to refresh the page. This might be useful, for example, when you want to do inline editing. The following example allows you to update the name of an item without affecting anything else that might be on the page.

Read more

CoffeeScript setup in Rails

I’ve just started using CoffeeScript with JQuery and Rails and I needed some system to organize my code. I’ve put all my classes and global variables in an app namespace, lets call it MyApp and for each controller I have a class and within that I have static methods for each action that is only run when that action is run.

Read more