I am trying to use RABL to create an API, but my setup is slightly different from the standard setup - as defined in their WIKI.
I set the API namespace on my routes:
namespace :api do resources :orders end
I have my controller in / app / controllers / api / orders _controller.rb
and my RABL view in /app/views/api/orders/index.json.rabl:
When I try to visit localhost: 3000 / api / orders, I get the following error:
Missing template
Missing template api/orders/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :haml, :rabl], :formats=>[:html], :locale=>[:en, :en]} in view paths
However, if I create a new file called '/app/views/api/orders/index.html.erb', it renders the view, but does not use RABL.
How can I make it use RABL?
thanks
source share