Blog cơ bản
Lập trìnhTạo blog với scaffold
Hướng dẫn
Lời giải
Tạo: 1. Post model với title, body, published 2. Scaffold full CRUD 3. Custom index view hiển thị published posts 4. Routes cho posts
Code mẫu
# app/controllers/posts_controller.rb class PostsController < ApplicationController # Viết code ở đây end