Ruby on Rails
Articles related to Ruby on Rails web development framework.
-
Select Records Created within the Last X Months in Ruby on Rails
In Ruby on Rails Feb 2, 2022
Suppose we have a blog application, and we want to show on the index page only the latest posts. Say we want to show the posts created within the last three months. How can we do that? We can use t...
-
The Root Route in Ruby on Rails
In Ruby on Rails Feb 2, 2022
When developing a web application, the most important thing is to set what to display on the home page. In Ruby on Rails, we specify what we want to show on the home page by defining a root route.<...
-
Member and Collection Routes in Ruby on Rails
In Ruby on Rails Jan 18, 2022
The routes of a Ruby on Rails application live in the config/routes.rb file. The Rails router matches a request in the browser to a controller action. The Rails default for routing is the resource rou... -
Using form_with With Nested Resources in Ruby on Rails
In Ruby on Rails Jan 14, 2022
In this post, we will deal with using the form_with helper with nested resources in Ruby on Rails. We will build a blog application, and the blog posts will have comments. We will nest the two reso...
-
Difference Between Path and URL in Rails
In Ruby on Rails Dec 6, 2021
In Rails, we often use the _path and _url helpers to link to various resources in our applications. But, what’s the difference between the two?
...