Giter Site home page Giter Site logo

rails-url-helpers-lab-nyc-web-010620's Introduction

Rails URL Helpers Lab

Objectives

  1. Generate URLs using route helpers

  2. Draw routes with implicit and explicit names using :as

  3. Draw routes with variables

  4. Generate URLs using route helpers that require variables

Instructions

In this lab you will be building out the Student management dashboard for the Flatiron School by starting to integrate the ability to link between pages. Two tests are currently passing, and the rest need implementation code to start passing. In order to complete this lab, you will need to complete the following tasks:

  • A user should be able to navigate to /students to view all of the students.

  • A user should be able to click the student's name on the index page and be taken to that specific student's show page.

  • Create a new boolean attribute called active in the students table. (HINT: You might have to search around for the best way to set a (ahem) default value (should default to false).)

  • A user should be able to go to /students/:id/activate to toggle their active attribute between true and false. (This is just the activate route, and not a actual view.)

  • Read the failing tests and modify the code until they pass.

Keep in mind

  • Make sure the show path is /students/:id, where :id is a route variable.

  • Call the Student class instance method to_s on each of the students on the index page so that each student element contains their first and last name.

  • On the student index page, test out all three different link_to argument options, e.g.: link_to "post", "/post/#{post.id}", link_to("post", post_path(post.id)), link_to("post", post_path(post)).

Resources

rails-url-helpers-lab-nyc-web-010620's People

Contributors

annjohn avatar maxwellbenton avatar jordanhudgens avatar danielseehausen avatar pletcher avatar realandrewcohn avatar brennenawana avatar bhollan avatar genericlady avatar humzahchoudry avatar jmburges avatar interestinall avatar drakeltheryuujin avatar rrcobb avatar survivingknowledge avatar bacitracin avatar ipc103 avatar nikymorg avatar sdcrouse avatar victhevenot avatar

Watchers

 avatar  avatar  avatar Bernard Mordan avatar Otha avatar raza jafri avatar  avatar Joe Cardarelli avatar The Learn Team avatar  avatar  avatar Matt avatar Antoin avatar  avatar Alex Griffith avatar  avatar Amanda D'Avria avatar  avatar Ahmed avatar Nicole Kroese  avatar Kaeland Chatman avatar Lisa Jiang avatar Vicki Aubin avatar  avatar  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.