- Install Rails
rails new .- Committed
Setup rails
- Committed
- Add motion to project
bundle add motionyarn add @unabridged/motion - Add view_components library
- Run motion install generator
- Add
require 'view_component/engine'toconfig/application.rb- Committed
Add motion to project
- Committed
- Create a blog post controller, model, and migration
rails g scaffold Post title:string content:text - Add an root route of
posts#index- Committed
Create post
- Committed
- Create comment model
rails g model Comment name:string body:text post:references - Add
has_many :commentsto Post model - Add name and body validations to Comment model
- Run migration
rails db:migrate- Committed
Create comment
- Committed
- Create motion comment form component
rails g motion:component CommentForm post - Create comment form view
- Add view to posts show page
- Create comment controller
- Add nested comment route
- Committed
Add Comments
- Committed
- Create motion comment list component
rails g motion:component CommentList post - Create comment list view
- Add view to posts show page
- Add broadcast after create
- Add stream_for to component
- Committed
Finish
- Committed
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
unabridged/motion-blog-demo
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published