I have a controller:
class ItemsController < ApplicationController
def index groups = Item.all respond_with(items) end
I am curling my_app/items.json and see a response with JSON object
as expected. At this point I don’t have any views associated with
controller, specifically I don’t have index.html.erb (.html).
Now if only I create an index.haml (for instance), with a simple %h1
Hello, world! line, requesting (again via curl) my_app/items.json
an html string with
Hello, world!. Note that I didn’t alter
controller code it just remains untouched.
I’m sure I’m missing something. Any help on explaining of what’s