GithubHelp home page GithubHelp logo

cittaliu / rails_partials_helpers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sf-wdi-27-28/rails_partials_helpers

0.0 0.0 0.0 37 KB

Refactoring exercise to review Rails partials and helpers.

Ruby 67.59% JavaScript 1.56% CSS 1.88% HTML 28.97%

rails_partials_helpers's Introduction

Rails Partials & Helpers

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.

Getting Started

  1. Fork this repo, and clone it into your local development folder on your local machine.
  2. Change directories into rails_partials_helpers, and bundle install.
  3. Run rake db:setup (make sure PosgreSQL is running).
  4. Start your Rails server; then you're ready to go!

Steps to Refactor

  1. Find all <a></a> tags in the views, and refactor them to use the link_to helper. (docs)
  2. Find all forms in this application, and refactor them to use the form_for helper. (docs)
  3. Refactor any duplicate code (hint: recipes new and edit forms) to use a partial. (docs)
  4. While you're at it, refactor the Bootstrap nav in the application layout to use a partial as well.
  5. Find all redirects (redirect_to) in the controller methods, and refactor them to use path prefixes. (docs)

Refer to the solution branch for guidance.

rails_partials_helpers's People

Contributors

cameronjacoby avatar tgaff avatar

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.