I can't understand what's happening, when I ask for index action I receive ActionController::UnknownFormat, even existing a index.js file inside views/products folder. Anyone can help me to figure out what I'm missing out? I'm using Rails 4 and Ruby 2.0.0-p247.
class ProductsController < ApplicationController
respond_to :js
def index
@products = Product.published.newest.page(params[:page])
respond_with @products
end
end