Working with Resourceful Routes in Ruby on Rails
More from Write Software, Well
In this post, we will explore how a simple Ruby method, when added to a controller, becomes an action in Rails, ready to process incoming HTTP requests and send responses. We'll also trace the path of an incoming HTTP request to a Rails controller action.
Sometimes you need dynamic content on the form, where parts of the form update based on the user input. This post shows how to use Hotwire's Turbo and Stimulus libraries for in-place form updates by loading data from the server, without submitting the form, which happens only once, at the end.
At first glance, Rails initializers seem complex, but they're solving a simple, but important problem: run some code after framework and gems are loaded, to initialize the application. This post covers the basics of initializers, including what they are, how they work, and how Rails implements them.
Rails 8 lets you mark a database column as not-null by appending an exclamation mark after the column while generating a migration. It's a nice quality of life improvement. This post also contains a few things I learned after reading the pull request.
With the recent WordPress drama, many developers might be concerned about its future. While WordPress isn't likely to go away, now might be the perfect time to invest in learning other tools and technologies. I suggest Ruby on Rails - you won't regret it!