title: How does rails understand that the past version of the application and shield against current updated changes
body: <p>The post is just to understand how rails understand the past version of my application and shield it against current breaking changes.</p>
  
  <p>We recently upgrade our app from 4.2+ -> 5.0. One of the changes that Rails implemented in Rails 5 is the use of <code>throw(:abort)</code> in <code>before_*</code> callbacks to break the chain (if there ever need be) and the use of <code>false</code> would simply have no side effect (i.e no callback chain will be halted when used <code>false</code>) (Please take a note of this)</p>
  
  <p>But here a catch. If you read <a href="https://gist.github.com/claudiob/614c59409fb7d11f2931" rel="nofollow noreferrer">this</a> this states clearly that if you are upgrading from <code>4.2 -&gt; 5.0</code> the <code>return false</code> inside <code>before_*</code> callbacks would still work.(with a warning but will work)</p>
  
  <p>So here my question after the update when I have the Rails, AR and AS gem to 5.0.0.1 version locked on my Gemfile.lock, how does Rails knows that I have upgraded the app from 4.2 and it has to respect the <code>return false</code> statement in the before_* callback which it would not if you create a fresh  application in Rails 5.0</p>
  
  <p>Possible a link to source code will also be helpful.</p>