Rails Fundamentals Session Three
Rails Fundamentals Session Three
ActionMailer
- To deliver the mail
.deliver_now
- Don’t make the user wait
.deliver_later
- Integrate with Active Job, using the sucker pucker adapter
- Aside, config/initializer is used in rails to initialize many other types of libraries
- sidekiq
- rollbar etc
Asset Pipeline
- Component responsible for managing
- css
- javascript
- images
- Sass - css with superpower
- Coffeescript - superset of javascript
Q&A
- Q: do you guys directly define assets in the rails app this way for any repos?
- A: Many rails apps in fulfillment define their assets in this way, but specific styles are generally not necesary, the libraries that are used are
- bootstrap
- bluestrap (ember)
- pomster ui (ember)
- Q: Is pomster ui something BA specific? I didn’t find any info in the web
-
A: yeah pomster was built internally :D
- Q: what’s bluestrap?
-
A: bluestrap is the blue apron version of bootstrap, which pre-dated pomster
- Q: he’s trying to run his application in production environment, I looked away for like 5 seconds and I have no idea why he’s even trying to do that now
- A: he’s showing you the differences between production and development environments for static content.
Asset pipeline, compile javascript for production
- Minification
- Uglification
- Obfuscation
- Encryption
Other observations
Responsive Web
- He’s talking about Media Queries, try scaling the FES UI on a small screen, it is responsive http://fulfillment-engine.production.b–a.co
Heroku and goba
- Blue Apron 4 years ago was deployed through heroku
- PAT started in Heroku! then one year later we moved into aws :)
- Heroku has so many build packs, they also have like a 100 person devops team (probably more)
- ba config!
- goba was inspired by heroku cli