RailsSpace code in Rails 4