Added Rails controllers and models. Introduced railsResourceFactory to bind angular with rails models.