Giter Site home page Giter Site logo

rails-hello-world-lab-v-000's Introduction

Rails Hello World Lab

In this lab you will integrate a static route so that the application will render a "Hello World" page.

Objectives

  1. Draw a route
  2. Map a route to a controller/action
  3. Render (implicitly or explicitly) a static template
  4. Create a static template

Instructions

Below are the tasks that you will need to complete in order to finish the lab:

  • Integrate a route for localhost:3000/hello_world.
  • Create a static controller that inherits from the application controller and contains the hello_world action. You can have the call to the view file occur using either the implicit or explicit processes.
  • Create a file in the views directory that will be called by the static controller's hello_world action, and add the heading <h1>Hello World</h1> to the file. The test is case sensitive, so make sure you enter it exactly as shown.

The RSpec/Capybara test suite is currently not passing. Run the tests to see what you need to fix. It might be helpful to fire up the Rails server (via the rails s command) in order to manually test the functionality of your route, action, and view. For students in the IDE, here's a Help Center article if you run into trouble with rails s.

Demo Screenshot

Note: From this point forward, labs will not always be provided as a blank slate, with the responsibility for creating migrations, models, controllers, etc. falling on you. Instead, many labs will contain broken or incomplete code, and you will be required to add to or fix the existing code in order for the specs to pass. In some cases, code that you wrote in a previous lab will be provided. This way, you can focus on applying new concepts instead of getting bogged down in repetitive work, such as setting up a basic Rails app for every new lab. In other cases, you will be gaining the practical experience of learning how to work within an existing code base, which is what you will likely experience at your first job. Rare is the junior developer who gets to create from whole cloth: it’s far more likely that you’ll be onboarded to a project with unfamiliar code created by other developers. Always use the specs to guide you through what additions and/or modifications are needed, and remember: you do not have to run the specs in the order provided in the lab. Work on your troubleshooting chops!

rails-hello-world-lab-v-000's People

Contributors

annjohn avatar christinalcole avatar chromeboi avatar cs-j avatar danielseehausen avatar gj avatar jordanhudgens avatar lizbur10 avatar maxwellbenton avatar sgharms avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rails-hello-world-lab-v-000's Issues

recommendation

I know this lab is supposed to be an intro to rails but honestly, the instructions are very confusing and vague, especially because now, there are so many more folders in the lab. I'd recommend being more specific about the exact file we need to create and where.

For example, being specific about creating a new static_controller.rb and erb file; more importantly, to go into config/routes.rb and what to type out. (Didn't initially understand what "Integrate a route for localhost:3000/hello_world" meant.) The syntax is different from what we were learning with sinatra so it can be confusing for students(like me) to understand to put what where, especially as we are just barely learning rails.

Hope this helps future students!

factory_girl gem deprecated

DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from require at /home/aspen/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:81)

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.