Lesson 2 — EmptyState and the boards index
Components::EmptyState
When a user first signs up to KanbanFlow they have no boards. An
EmptyState component handles this gracefully — a friendly message and
an optional call-to-action when a collection is empty.
Empty states appear throughout the app — no boards, no cards in a column,
no members on a board. Rather than handling each inline with scattered
if @collection.empty? conditionals, we build a reusable component once.
|
|
Add a Lookbook preview:
|
|
The boards controller
The controller defines what the app does — fetch data, hand it to a view, redirect on success:
|
|
Update routes:
|
|
Views::Boards::Index
|
|
Views::Boards::Show
A placeholder for now — the full Kanban board UI is built in Module 9:
|
|
Visit http://localhost:3000. With seed data loaded you should see a
grid of boards. Click one to see the column placeholder view.