I can't figure out what happens when I request an index action, I get ActionController :: UnknownFormat, even the existing index.js file inside the views / products folder. Can anyone help me figure out what I am missing? I am 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
source share