Question

When building HTTP API which respond only JSON format with Rails 3.2, should I turn off things like Asset Pipeline and javascript files?

If so, how to do it correctly instead of manually deleting which sounds dirty?

Was it helpful?

Solution

Probably a good idea if you're only serving up the api, here's how:

rails new appname --skip-sprockets

For an existing application, in your application.rb:

config.assets.enabled = false
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top