Building the UI First
Learn about building the UI for our example under discussion.
We'll cover the following
No matter how the UI must be styled, it needs to allow the user to select a manufacturer, enter a widget name and price, and see any validation errors related to the data entered. We’ll create the UI using semantic markup that is connected to the controller, which we’ll leave fairly bare. We’ll freshen up the UI using our design system and then write a system test. When that system test is done, we can start on the business logic.
Before we create the UI, we’ll need to set up a route and some controller methods. We should also create some development data in db/seeds.rb
.
Setting up to build the UI
First, we’ll modify the existing widgets resource in config/routes.rb
to allow :new
, and create
:
Get hands-on with 1200+ tech skills courses.