Objective: Refactor all forms, links, and redirects in this application to take advantage of Rails partials, view helpers (form_for
and link_to
), and path prefixes.
- Fork this repo, and clone it into your
develop
folder on your local machine. - Change directories into
rails_partials_helpers
, andbundle install
. - Run
rake db:create db:migrate
(make sure PosgreSQL is running). - Start your Rails server, then you're ready to go!
- Find all forms in this application, and refactor them to use the
form_for
helper. (docs) - Refactor any duplicate code (hint: recipes new and edit forms) to use a partial. (docs)
- While you're at it, refactor the Bootstrap nav in the application layout to use a partial as well.
- Find all
<a></a>
tags in the views, and refactor them to use thelink_to
helper. (docs) - Find all redirects (
redirect_to
) in the controller methods, and refactor them to use path prefixes. (docs)
Refer to the solution branch for guidance.