When reviewing the turbo-rails source code , I noticed something that I had never seen before: # test/dummy/config/application.rb case ( rails_version = ENV [ "RAILS_VERSION" ]) when "main" , nil then 7.1 else rails_version . to_f end Question: But what is: "main", nil then 7.1 ? You could write as the following: when rails_version === "main" || rails_version === nil or when rails_version ===…
I hate unless statements. customer . friend_orders . subtract ( self ) unless customer . nil? # the above is equivalent to the below: customer . friend_orders . subtract ( self ) if ! customer . nil? The if statement is patently more understandable to my brain. I tend to stare at the unless statement and sit confused for 2 minutes, like a monkey trying to work a calculator. I try to piece it…
If you take a Tekla Beam, then it automatically is given a beam coordinate system. But what does it mean? The documentation doesn’t contain much helpful information. Hopefully the above image will be helpful Also note that it defines what rotation means. The process is opaque, but you can calulate it if you wish. I managed to backward calculate everything. You may review it in the Tekla Extension…