Rails Rails routes difference between resource and resources Rails provides RESTful routing for resources. Routes can either define single resource or plural resources to generate routes of the application.
Rails How to get integer value from enum in Rails? Getting value of integer stored in database for enum attribute on Rails ActiveRecord models can get tedious. This article will help understand how to fetch integer value of enum on ActiveRecord model in
Rails Rails test jbuilder json response with rspec Testing jbuilder response in rspec integration tests requires an extra helper method to be included in test. Requests in integration tests do not render json response unless we include render_views helper.
Rails Rails counter cache associations Rails provides an ability to cache count of associated table records. This gives an edge that avoids querying to get number of records of associated table.
Rails Rails 6.1 ActiveRecord deprecates update_attributes methods Rails 6.1 ActiveRecord deprecates update_attributes method calls. This method was renamed to update method.
Rails Rails changed behavior of attribute_changed in callbacks Rails changed behavior of attribute_changed? in after and before callbacks. Older versions will throw deprecation warnings indicating which methods to use instead.