Week 6 - Overview
Students should be comfortable with the following at the end of this week:
- The Asset Pipeline
- SCSS
- Session
- Authentication and Authorization
- Nested Attributes
Important Links
Monday - The Asset Pipeline and SCSS
Challenge: ActiveRecord
- Random Topics
- How to use modules on this assignment!
include
vs. extend
- Marketing yourself
- Networking at events
- Self Confidence vs. Arrogance
- Bragging vs. Marketing
- Entitlement of the Software Developer Community
Time.zone.now
config.time_zone = 'Eastern Time (US & Canada)'
- Agile
- ON BOARD: Data-first AND workflow-first thinking
- DIAGRAMS: Data model vs workflow diagrams
- The Asset Pipeline
- Example: Add photos to someone’s Health Tracker
- The
public
Folder
favicon.ico
app/assets/images
and asset(url)
- Consolidation of stylesheets to decrease load time
- The
lib
and vendor
folders
- SCSS
- Bootstrap
Lecture Notes/Links
Evening Reading
Assignment
Restaurant Menu
Tuesday - Session and Authentication
Challenge: form_for
Problem of the Day: Menu Authentication
- Human Learning
- ON BOARD: Study concept over implementation
- Random Topics
- Bootstrap Grid System
- Accessibility
- Nested Routes
- Collection/Member Routes
- Session
- Authentication
Lecture Notes/Links
Evening Reading
Assignment
Get started on Gradebook. This is a two-night assignment, so in the first night you should at least:
- Build the data structure, models, and migrations that you’ll need.
- Allow teachers (and only teachers) to log in and log out.
- Allow teachers (and only teachers) to manage all teachers and all students.
- Allow teachers (and only teachers) to manage grades for all students.
This means that tonight you specifically do NOT have to worry about:
- Entering/managing information about parents.
- Allowing students or parents to log in.
- Limiting teachers to only view and edit their own students and student grades.
Those requirements can be handled tomorrow night. If you feel like you’ll make it to hard or nightmare modes, read those before you start coding and consider taking that future functionality into account in your data structure.
Wednesday - Authorization and Scope
Challenge: REST
- Agile
- ON BOARD: Start small
- Example: Building a storefront app
- Random Topics
BCrypt::Password.create("password", cost: 4)
- Don’t set your root to be your login page
flash
vs. flash.now
- Render vs. Redirect
- Multi-tenancy
.ruby-version
- HTTP Response Types (reminder)
- Access vs. Authentication vs. Authorization
- Example: Lock Gradebook teachers down to seeing only their classes.
- Authorization Approaches
- Integration Tests
get root_path
assert_redirected_to login_path
follow_redirect!
assert_template "new"
assert_select "a[href=#{logout_path}]", 1
Lecture Notes/Links
Evening Reading
Assignment
Complete Gradebook.
Thursday - Nested Attributes
Challenge: Partials
accepts_nested_attributes
- Scope
default_scope
scope
- Defining methods on associations
- git
- Pull request w/ code review workflow
Lecture Notes/Links
Evening Reading
Weekend Assignment - IN PAIRS
Survey Opossum