Upgrading Rails applications to Tailwind 4 - With the TailwindCSS 4 beta out, I decided to upgrade my Rails applications. Here are the steps I took to do the upgrade*:
[read more...]Posts tagged "ruby"
November 30, 2024
December 28, 2021
Ruby On Rails Resources I Use Every Day - Here are a few sites/resources I have bookmarked that I refer to day to day when coding Ruby on Rails applications.
December 12, 2021
April 9, 2021
Installing Ruby 2.6.7 on MacOS with asdf - On MacOS Big Sur - installing Ruby 2.6.7 may fail during the compilation step. Here is the snippet I used to ensure it compiles and installs.
February 10, 2020
Execution order of after_commit and after_rollback ActiveRecord callback - Rails allows the adding of various callbacks that trigger during the lifecycle of an ActiveRecord operation. The standard callbacks are before_validation
, after_validation
, before_save
, before_create
, after_create
, after_save
, after_commit
, and after_rollback
.
These are documented quite extensively in the Rails Guides and the Rails API documentation.
The documentation is quite good at showing you the order the callbacks are executed - eg before_validation
fires before validate
which fires before before_save
etc. Most of these validations execute in the order they are defined. For example, if you have two before_save
callbacks defined, then they will execute one after the other.
June 29, 2011
Rails, testing, and peace of mind - I must admit, I probably didn’t test my code as thoroughly as I ought to have. Let me re-phrase that. I did test it. I just didn’t write complete test cases to ensure regressions weren’t introduced when new bits were added. As a result, maintenance always took longer than it should have, and bugs were introduced when changes were made. Even though I had read and studied the importance of testing very early in my software development career, it was only after continued frustration with things breaking that I got off my butt and actually started using testing practices like TDD, BDD and even writing tests for code that had already been written. I made it a goal to have the code as covered as possible.
[read more...]