さて、これを2時間見つめています。
私はviews/category/index.html.hamlのHAMLで空のフォームを試しています
=form_for @categories do |f|
  =f.submit
私のcategories_controller.rbは次のようになります...
class CategoriesController < ApplicationController
  # GET /categories
  # GET /categories.json
  def index
    @categories = Category.all
    respond_to do |format|
      format.html # index.html.haml
      format.json { render json: @categories }
    end
  end
end
私は取得しています...NilClass:ClassのCategories#index undefined method`model_name'のNoMethodError
これは簡単なことですが、今は頭がおかしいです。