Coder Social home page Coder Social logo

sf-wdi-labs / rails-views-partials-helpers-lab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sf-wdi-25/rails_partials_helpers

0.0 6.0 8.0 59 KB

Refactoring exercise to review Rails partials and helpers.

Ruby 67.23% JavaScript 2.46% CSS 2.75% HTML 26.26% CoffeeScript 1.30%
views

rails-views-partials-helpers-lab's Introduction

Rails Views & Helpers Training

Objective: Refactor forms, links, and redirects in this application to take advantage of Rails partials, view helpers (form_for and link_to), and path prefixes.

Getting Started

  1. Fork this repo, and clone it to your local machine.

  2. Change directories into the project directory, and bundle install.

  3. Run rails db:create db:migrate db:seed (or rails db:setup).

  4. Start your Rails server, and you're ready to go!

Steps to Refactor

  1. Find two <a></a> tags in the views, and refactor them to use the link_to helper.

Tip: Use Command + Shift + F to bring up an interface to search all project files in Atom or Sublime.

  1. Find one form in this application, and refactor it to use the form_for helper.

  2. Refactor the recipes new and edit forms to use a partial.

  3. While you're at it, refactor the Bootstrap navbar in the application layout to use a partial.

  4. Find one redirect (redirect_to) in the controller methods, and refactor it to use path prefixes.

Refer to the solution branch if needed for guidance.

rails-views-partials-helpers-lab's People

Contributors

bgveenstra avatar cameronjacoby avatar justincastilla avatar mnfmnfm avatar tgaff avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rails-views-partials-helpers-lab's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.