View this talk as a blog: http://alexkitchens.net/2017/05/06/rails-source-code.html
Open source projects like Rails are intimidating, especially as a beginner. It’s hard to look at the code and know what it does. But Ruby on Rails is more than just code. Written into it are years of research, discussions, and motivations. Also written into it are bugs, typos, and all of the pieces that make the code human. This talk outlines steps you can take to explore the inner workings of Rails and gain context on its design. Understanding how Rails works will allow you to write better Rails applications and better Ruby code. You will leave with many resources and tips on perusing Rails.
26. +
Your Story tenderlove github
ActionMailer
Mail Delivery
ActiveJob
Jobs/Tasks
ActionCable
Integrated
WebSockets
27. +
Your Story tenderlove github
ActionMailer
Mail Delivery
ActiveJob
Jobs/Tasks
ActionCable
Integrated
WebSockets
tenderlove
Aaron Patterson
What room are you in?
South Ballroom
45. 41: def save(*) # :nodoc:
=> 42: SuppressorRegistry.suppressed[self.class.name] ?
true : super
43: end
activerecord/lib/active_record/suppressor.rb
46. 306: def save(*) #:nodoc:
307: rollback_active_record_state! do
=> 308: with_transaction_returning_status { super }
309: end
310: end
activerecord/lib/active_record/transactions.rb
47. 34: def save(*)
=> 35: if status = super
36: changes_applied
37: end
38: status
39: end
activerecord/lib/active_record/attribute_methods/dirty.rb
48. 43: def save(options = {})
=> 44: perform_validations(options) ? super : false
45: end
activerecord/lib/active_record/validations.rb
89. ❯ Initial Commit
commit baa237c974fee8023dd704a4efb418ff0e963de0
Author: Santiago Pastorino <santiago@wyeworks.com>
Date: Mon Mar 21 21:36:05 2011 -0300
Allow to read and write AR attributes with non valid identifiers
94. DEPRECATION WARNING: `redirect_to :back` is
deprecated and will be removed from Rails 5.1.
Please use `redirect_back(fallback_location:
fallback_location)` . . .
95. ~/rails ❯ git log -S
"Please use `redirect_back(fallback_loc"
96. ~/rails ❯ git log -S
"Please use `redirect_back(fallback_loc"
commit 13fd5586cef628a71e0e2900820010742a911099
Author: Derek Prior
Date: Tue Dec 15 20:17:32 2015 -0500
Add `redirect_back` for safer referrer redirects
. . .
When there is no referrer available on the request,
`redirect_to :back` will raise `ActionController::RedirectBackError`,
usually resulting in an application error.
. . .