Re: [Rails] Rails 4, subdomain routing

2013-11-22 Thread Tamara Temple
On Nov 21, 2013, at 5:37 AM, Rob Biedenharn wrote: > On 2013-Nov-21, at 04:12 , Tamara Temple wrote: > >> >> On Nov 20, 2013, at 4:04 AM, Srdjan Cengic wrote: >>> >>> Far as i know, link to http://api.localhost:3000/posts should work but i >>> get routing error: >>> No route matches [GET]

Re: [Rails] Rails 4, subdomain routing

2013-11-21 Thread Rob Biedenharn
On 2013-Nov-21, at 04:12 , Tamara Temple wrote: > > On Nov 20, 2013, at 4:04 AM, Srdjan Cengic wrote: >> >> Far as i know, link to http://api.localhost:3000/posts should work but i get >> routing error: >> No route matches [GET] "/posts" (Same with /posts.json) > > This isn’t how localhost

Re: [Rails] Rails 4, subdomain routing

2013-11-21 Thread Tamara Temple
On Nov 20, 2013, at 4:04 AM, Srdjan Cengic wrote: > > Far as i know, link to http://api.localhost:3000/posts should work but i get > routing error: > No route matches [GET] "/posts" (Same with /posts.json) This isn’t how localhost works, at all. If you need to set up a local subdomain for te

[Rails] Rails 4, subdomain routing

2013-11-20 Thread Srdjan Cengic
Trying to implement web service in rails through API sub-domain called "api". In my hosts file i added line: 127.0.0.1 api.localhost In my routes.rb i set sub-domain, where i only need index action and few manually added restful routes, through following: namespace :api, path: '', :constraint