コントローラはApplicationController
scaffoldでモデルXxxを作成すると、app/controllersの中にxxxs_controller.rbファイルが作成される。
これには、以下のように記載されている。
class PostsController < ApplicationController # GET /posts # GET /posts.xml def index # 省略 end # GET /posts/1 # GET /posts/1.xml def show # 省略 end # GET /posts/new # GET /posts/new.xml def new # 省略 end # GET /posts/1/edit def edit # 省略 end # POST /posts # POST /posts.xml def create # 省略 end # PUT /posts/1 # PUT /posts/1.xml def update # 省略 end # DELETE /posts/1 # DELETE /posts/1.xml def destroy # 省略 end end
これらは、WEBアクセスした時の処理のインターフェースになる。
たぶん、実際に動かしたほうがわかりやすいはずなので、その時に調べてみよう。