Git Product home page Git Product logo

week2's Introduction

Week 2 Homework

This week, you'll create a Rails app that can generate web pages on a local server.

There are no automated tests this week.

Requirements

Create a Rails application that:

  • Responds to "http://localhost:3000/favorites" to display a few of your favorite things in an HTML unordered list.
  • Responds to "http://localhost:3000/friends" to display a few names of your friends in an HTML unordered list.
  • Responds to "http://localhost:3000/greeting" to display a random greeting each time I visit the page. The possible greetings are: "Hello", "How are you?", and "Howdy". Your page must select one at random each time.
  • Responds to "http://localhost:3000/search" by redirecting the user to Google's search page.
  • Has a navbar at the top of every page, that provides links to all of the pages in your app, including your search url.
  • You must use named routes for all URLs in your views and controllers.

Remember:

  • "Routes" map an incoming url path to a specific controller instance method.
  • Routes can be "named". Named routes provide view helper methods you can use instead of hardcoding URL strings into your view templates.
  • Controller instance methods must render a response.
  • They can render a response explicitly or implicitly (using a view template).
  • User instance variables to transmit data from a controller to a view.

week2's People

Contributors

daimili avatar

Watchers

dmc5 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.