Coder Social home page Coder Social logo

mblair415 / rails_views_helpers_training Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sf-wdi-34/rails_views_helpers_training

0.0 1.0 0.0 53 KB

[rails, partial, view, helper, refactor]

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

rails_views_helpers_training'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 rails_views_helpers_training, and bundle install.
  3. Run rake db:create db:migrate db:seed (or rake db:setup).
  4. Start your Rails server; then you're ready to go!

Steps to Refactor

  1. Find five <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 one instance of duplicate code (hint: 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 or named yield.

  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_helpers_training's People

Contributors

cameronjacoby avatar tgaff avatar bgveenstra avatar justincastilla avatar

Watchers

James Cloos 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.