Git Product home page Git Product logo

flatiron-bnb-controllers-and-views-seattle-web-080519's Introduction

Flatiron-BnB: Controllers and Views

Now that we have our model associations and methods, it's time to make this application run in the browser! We've built out our fat models, and it's time to build our skinny controllers and minimially logic-ful views. And what good will controllers be without routes and views? Well, no good at all! So we will build those too. This lab comes with the solution for the previous bnb-methods lab, so you can dive right in.

Instructions

Your basic views and controller routes will be very familiar when displaying data. Remember, that we have some related data. For example, a city has many listings therefore when we look at the show page for an individual city the listings should also be shown. For all relevant models, create the corresponding views with the associated data. This is the time to think and decide what your new forms may look like. For example, you may want to create a host with a listing in the same step so the new form for your host model may also create the associated listing.

This lab is meant to be open ended so that you have the opportunity to reason out what controllers, routes, and views you are interested in creating. At the end of this lab you want to be able to demonstrate that a user can move through your entire application end to end.

In the previous lab you built several methods. It is now time to actually use those methods. For example we have the city#city_openings method in your city.rb file. This can be used to search for available openings. See demo below:

Alt text

View Flatiron Bnb Methods Lab on Learn.co and start learning to code for free.

flatiron-bnb-controllers-and-views-seattle-web-080519's People

Contributors

ahimmelstoss avatar kthffmn avatar ipc103 avatar pletcher avatar jeffkatzy avatar irmiller22 avatar maxwellbenton avatar fislabstest avatar stephaniecoleman avatar howardbdev avatar annjohn avatar garettarrowood avatar changamanda avatar jmburges avatar danielseehausen avatar fs-lms-test-bot avatar johannkerr avatar mendelb avatar preetness avatar sarogers 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.