Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Remove classroom index view Mar 5, 2018
bin
config adds routes Feb 20, 2019
db
lib
log moved everything out of educator folder Jan 21, 2016
public
spec added one test to make sure parital gets called in students show Jan 21, 2016
vendor/assets
.gitignore AUTO: standardize .gitignore Mar 7, 2019
.learn First commit Jan 12, 2016
.rspec
CONTRIBUTING.md
Gemfile adds faker gem Feb 20, 2019
LICENSE.md First commit Jan 12, 2016
README.md
Rakefile moved everything out of educator folder Jan 21, 2016
config.ru moved everything out of educator folder Jan 21, 2016

README.md

Simple Partials Lab

Objectives

  1. Use the render method to render partials
  2. Understand how the name of a partial turns into its filename
  3. Practice rendering partials in a different folder

Overview

Flatiron is building out a new system to keep track of students in its classes. You just joined the technical team and see that there's lots of repetition in the view layer of the code base. Use your new knowledge of partials to remove the duplication.

Instructions

First, fork and clone the lab.

We've provided a seed file so you can have some data to play around with. Run rake db:seed to seed the database.

  1. Remove the duplicated code in the students/edit.html.erb and students/new.html.erb files by making a partial called students/_form.html.erb.
  2. Remove the duplicated code in the classrooms/show.html.erb and students/show.html.erb files by making a partial called students/_student.html.erb.

View Simple Partials Lab on Learn.co and start learning to code for free.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.