class CreatePostTable < ActiveRecord::Migration2, controller名,複數
def change
create_table :posts do |t|
end
end
end
# app/controllers/posts_controller.rb3, models名,單數
class PostsController < ApplicationController
end
# app/models/post.rb4, views名,資料夾是複數
class Post < ActiveRecord::Base
end
# app/views/posts/index.html.erb
沒有留言:
張貼留言