{"id":6560,"date":"2019-05-06T12:13:04","date_gmt":"2019-05-06T06:43:04","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=6560"},"modified":"2026-03-27T17:13:22","modified_gmt":"2026-03-27T11:43:22","slug":"notable-activerecord-changes-in-rails-6-part-2","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/","title":{"rendered":"Notable ActiveRecord changes in Rails 6 \u2013 Part 2"},"content":{"rendered":"\n<p><span style=\"font-weight: 400;\">Welcome to the second part of this series about notable changes of ActiveRecord in Rails 6. <\/span><strong><a href=\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part I<\/a><\/strong><span style=\"font-weight: 400;\"> <code>covered ActiveRecord::Relation#pick<\/code>, <code>ActiveRecord::Base.create_or_find_by!<\/code>, negative scopes to all enum values, implicit order column configuration. Let\u2019s dive into more methods added in Rails 6.\u00a0<\/span><\/p>\n\n\n\n<p><strong><code>Raise ActiveModel::MissingAttributeError when update_columns is used with non-existing attribute<\/code>&nbsp;<\/strong><\/p>\n\n\n\n<p>Rails 6 now raises <strong><code>ActiveModel::MissingAttributeError<\/code><\/strong> when <strong><code>update_columns<\/code><\/strong> is used with a <strong><code>non-existing<\/code><\/strong> database attribute.<\/p>\n\n\n\n<p>Let\u2019s try updating User with an <strong><code>office_email<\/code><\/strong> field which is not present in the database and you will see the results showing an error.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/f976c68240bdbd9833a972c4d530e2ab.js\"><\/script><\/p>\n\n\n\n<p><strong><code>update_columns<\/code><\/strong> raises <strong><code>ActiveRecord::StatementInvalid<\/code><\/strong> error in earlier version of Rails.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/05dbd78cdc55a9c03d2c73019c1900a3.js\"><\/script><\/p>\n\n\n\n<p><strong><code>delete_by and destroy_by as ActiveRecord::Relation methods<\/code><\/strong><\/p>\n\n\n\n<p>Rails have find_or_create_by, find_by and similar methods to find first and create if not found a matching record for given parameters. Rails were missing similar feature for deleting\/destroying the records.<\/p>\n\n\n\n<p>Before Rails 6, deleting\/destroying the record(s) which are matching the given condition is achieved by using multiple methods.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/94fe93c075550b2b4bcd635a215e279a.js\"><\/script><\/p>\n\n\n\n<p>Rails 6 added new <em><code>ActiveRecord::Relation#delete_by<\/code><\/em> and <em><code>ActiveRecord::Relation#destroy_by<\/code><\/em> methods in <code>ActiveRecord::Relation<\/code> which are short-hand for<\/p>\n\n\n\n<p><em><code>relation.where(conditions).delete_all<\/code> and <code>ActiveRecord::Relation#destroy_by<\/code> is short-hand <\/em>for<em> <code>relation.where(conditions).destroy_all respectively.<\/code><\/em><\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/ce380d1fc6cbe96a469de13015773889.js\"><\/script><\/p>\n\n\n\n<p>You can also pass the multiple attributes in arguments as well.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/1477b08e61890ed2b609852a44dd1014.js\"><\/script><\/p>\n\n\n\n<p><strong><code>ActiveRecord::Relation#touch_all<\/code><\/strong><\/p>\n\n\n\n<p>Before understanding touch_all method, let\u2019s recall what existing <strong>touch<\/strong> method is. <strong>touch<\/strong> is used to update updated_at timestamp by default to the current time, no validation is performed and only the <code>after_touch<\/code>, <code>after_commit<\/code>, and <code>after_rollback<\/code> callbacks are executed.<\/p>\n\n\n\n<p>Rails 6 has added <strong><code>touch_all<\/code><\/strong> on <code>ActiveRecord::Relation<\/code> to touch multiple records at once. Before Rails 6, we needed to iterate on all records using an iterator to achieve the same.<\/p>\n\n\n\n<p>Let&#8217;s see how we can touch all record in Rails 5<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/4d0df2bf9e5429a43c4d6cdbfe2bb8bf.js\"><\/script><\/p>\n\n\n\n<p>Touch method will return an array of ActiveRecords which are being affected.<\/p>\n\n\n\n<p>Same can be achieved with touch_all in rails 6 easily<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/a956004023c73287154820bdf5352657.js\"><\/script><\/p>\n\n\n\n<p>touch_all method will return the counts of the ActiveRecords which are being affected instead of an array as for rails 5.<\/p>\n\n\n\n<p>It also takes the custom time or different columns as parameters like below. It\u2019s cool, right?<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/67db72a18c1d93c5c78752c8a8469ca6.js\"><\/script><\/p>\n\n\n\n<p><strong><code>ActiveModel::Errors#of_kind?<\/code><\/strong><\/p>\n\n\n\n<p>Rails 6 added <strong><code>of_kind<\/code><\/strong>? on <code>ActiveModel::Errors<\/code>. It returns true if provided key and message associated with <code>ActiveModel::Errors<\/code> object.<\/p>\n\n\n\n<p>The default message is :invalid.<\/p>\n\n\n\n<p><strong><code>of_kind<\/code><\/strong>? is same as <strong><code>ActiveModel::Errors#added<\/code><\/strong>? but it doesn\u2019t take extra options as a parameter.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/d89085435b2415d9d294d5fec314cd5d.js\"><\/script><\/p>\n\n\n\n<p><strong><code>ActiveModel::Errors#slice!<\/code><\/strong><\/p>\n\n\n\n<p>Rails 6 added one more method <strong><code>slice<\/code><\/strong>! to <code>ActiveModel::Errors<\/code> which makes quite easy to select just a few keys from errors and show or return them. Before Rails 6, we need to convert <code>ActiveModel::Errors<\/code> object to a hash before slicing the keys.<\/p>\n\n\n\n<p>Let\u2019s see how it works for Rails 5.2<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/8748b3f98632ad83e172db56f05aa745.js\"><\/script><\/p>\n\n\n\n<p>Below is the example for Rails 6<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/MittalPatel-BTC\/fbba3910a31e7494d909fd9ca4b0fcab.js\"><\/script><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>Thanks for Reading!&nbsp;<\/strong><\/p>\n\n\n\n<p><span style=\"font-weight: 400;\">If you are interested in learning more about Rails 6, check out following blogs,<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li> <blockquote><p><a href=\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"font-weight: 400;\">Notable ActiveRecord changes in Rails 6 \u2013 Part 1<\/span><\/a><\/p><\/blockquote> <\/li><li> <blockquote><p><a href=\"https:\/\/www.botreetechnologies.com\/blog\/introducing-jquery-in-rails-6-using-webpacker\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"font-weight: 400;\">Introducing jQuery in Rails 6 Using Webpacker<\/span><\/a><\/p><\/blockquote> <\/li><\/ol>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\" target=\"_blank\" rel=\"noopener noreferrer\">Click here for more details&#8230;<\/a><\/h3>\n\n\n\n<p>At <a href=\"https:\/\/www.botreetechnologies.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">BoTree Technologies<\/a>, we build enterprise applications with our RoR team of 25+ engineers.<\/p>\n\n\n\n<p>We also specialize in RPA, AI, Python, Django, JavaScript and ReactJS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.botreetechnologies.com\/contact\" target=\"_blank\" rel=\"noopener noreferrer\">Consulting is free<\/a> &#8211; let us help you grow!<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the second part of this series about notable&#8230;<\/p>\n","protected":false},"author":43,"featured_media":13484,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-6560","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Notable ActiveRecord changes in Rails 6 \u2013 Part 2<\/title>\n<meta name=\"description\" content=\"Learn more about Rails 6 new methods and the changes to an existing methods of ActiveRecords which makes your performance faster, easier and in one shot you can perform multiple things.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Notable ActiveRecord changes in Rails 6 \u2013 Part 2\" \/>\n<meta property=\"og:description\" content=\"Learn more about Rails 6 new methods and the changes to an existing methods of ActiveRecords which makes your performance faster, easier and in one shot you can perform multiple things.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-06T06:43:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-27T11:43:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mittal Patel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mittal Patel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\"},\"author\":{\"name\":\"Mittal Patel\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/e1398e9b330d623c88987fcf781b8a6d\"},\"headline\":\"Notable ActiveRecord changes in Rails 6 \u2013 Part 2\",\"datePublished\":\"2019-05-06T06:43:04+00:00\",\"dateModified\":\"2026-03-27T11:43:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\"},\"wordCount\":448,\"commentCount\":13,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png\",\"articleSection\":[\"Ruby on Rails\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\",\"name\":\"Notable ActiveRecord changes in Rails 6 \u2013 Part 2\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png\",\"datePublished\":\"2019-05-06T06:43:04+00:00\",\"dateModified\":\"2026-03-27T11:43:22+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/e1398e9b330d623c88987fcf781b8a6d\"},\"description\":\"Learn more about Rails 6 new methods and the changes to an existing methods of ActiveRecords which makes your performance faster, easier and in one shot you can perform multiple things.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png\",\"width\":1200,\"height\":630,\"caption\":\"Ruby on Rails ActiveRecord\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Notable ActiveRecord changes in Rails 6 \u2013 Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/e1398e9b330d623c88987fcf781b8a6d\",\"name\":\"Mittal Patel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/mittal-patel-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/mittal-patel-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/mittal-patel-150x150.png\",\"caption\":\"Mittal Patel\"},\"description\":\"Mittal is a Ruby on Rails Developer. She loves Ruby &amp; Javascript. Also, she loves to solve problems and taking ownership of her work. Apart from coding, she likes to listen to songs, eating desserts and cooking.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Notable ActiveRecord changes in Rails 6 \u2013 Part 2","description":"Learn more about Rails 6 new methods and the changes to an existing methods of ActiveRecords which makes your performance faster, easier and in one shot you can perform multiple things.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Notable ActiveRecord changes in Rails 6 \u2013 Part 2","og_description":"Learn more about Rails 6 new methods and the changes to an existing methods of ActiveRecords which makes your performance faster, easier and in one shot you can perform multiple things.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2019-05-06T06:43:04+00:00","article_modified_time":"2026-03-27T11:43:22+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png","type":"image\/png"}],"author":"Mittal Patel","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Mittal Patel","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/"},"author":{"name":"Mittal Patel","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/e1398e9b330d623c88987fcf781b8a6d"},"headline":"Notable ActiveRecord changes in Rails 6 \u2013 Part 2","datePublished":"2019-05-06T06:43:04+00:00","dateModified":"2026-03-27T11:43:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/"},"wordCount":448,"commentCount":13,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png","articleSection":["Ruby on Rails","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/","url":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/","name":"Notable ActiveRecord changes in Rails 6 \u2013 Part 2","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png","datePublished":"2019-05-06T06:43:04+00:00","dateModified":"2026-03-27T11:43:22+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/e1398e9b330d623c88987fcf781b8a6d"},"description":"Learn more about Rails 6 new methods and the changes to an existing methods of ActiveRecords which makes your performance faster, easier and in one shot you can perform multiple things.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png","width":1200,"height":630,"caption":"Ruby on Rails ActiveRecord"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Notable ActiveRecord changes in Rails 6 \u2013 Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/e1398e9b330d623c88987fcf781b8a6d","name":"Mittal Patel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/mittal-patel-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/mittal-patel-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/mittal-patel-150x150.png","caption":"Mittal Patel"},"description":"Mittal is a Ruby on Rails Developer. She loves Ruby &amp; Javascript. Also, she loves to solve problems and taking ownership of her work. Apart from coding, she likes to listen to songs, eating desserts and cooking."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=6560"}],"version-history":[{"count":2,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6560\/revisions"}],"predecessor-version":[{"id":16334,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6560\/revisions\/16334"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13484"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=6560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=6560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=6560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}