{"id":6482,"date":"2019-04-30T10:09:36","date_gmt":"2019-04-30T04:39:36","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=6482"},"modified":"2021-09-28T17:42:56","modified_gmt":"2021-09-28T12:12:56","slug":"notable-activerecord-changes-in-rails-6-part-1","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/","title":{"rendered":"Notable ActiveRecord changes in Rails 6 &#8211; Part 1"},"content":{"rendered":"\n<p>In this article, we will look into some new <strong>ActiveRecord<\/strong> methods introduced in Rails 6. This version of Rails requires Ruby version 2.5.0 or higher.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ActiveRecord::Relation#pick &#8211; Shorthand for Single Value Plucks<\/h2>\n\n\n\n<p>Lets\u2019 first recall <strong>#pluck<\/strong> method, that is since rails version 3.2.0. <strong>#pluck<\/strong> method is a shortcut for selecting one or more attributes without loading a bunch of records.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/0ea9ed7efe34e55f14faff0a92cac756.js\"><\/script><\/p>\n\n\n\n<p>But to get just single value(s), we do something like this.<\/p>\n\n\n\n<p><strong>Before RAILS 6:<\/strong><\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/e8a5afef368c587179ef2b102d6dfd86.js\"><\/script><\/p>\n\n\n\n<p>From Rails 6.0, we can use the method <strong>#pick<\/strong> method, which is shorthand for<\/p>\n\n\n\n<p><code>limit(1).pluck(*column_names).first<\/code><\/p>\n\n\n\n<p><strong>RAILS 6:<\/strong><\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/91f988b5ce349176045b6fbc66e658bc.js\"><\/script><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">ActiveRecord::Base.<a href=\"https:\/\/github.com\/rails\/rails\/pull\/31989\" target=\"_blank\" rel=\"noopener noreferrer\">create_or_find_by\/!<\/a><\/h3>\n\n\n\n<p><strong><code>create_or_find_by<\/code><\/strong> and <strong><code>create_or_find_by!<\/code><\/strong> &#8211; Methods added to Rails 6. Both rely on unique constraints on the underlying table. It is used to create a new record in the database with given data that has one or more unique constraints of its columns. If a record already exists with unique constraints, it raises an exception which is the same as raised in insertion and finds the existing record with given attributes using <strong><code>find_by\/!<\/code><\/strong>.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/1aa9acf7d11f3db6f2c9b05e7cea7eb6.js\"><\/script><\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/9c77e929ea7d04b6881d84f8771ecf74.js\"><\/script><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"228\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-1-1.jpg\" alt=\"output 1\" class=\"wp-image-13515\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-1-1.jpg 686w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-1-1-300x100.jpg 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"685\" height=\"298\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-2-1.jpg\" alt=\"output 2\" class=\"wp-image-13516\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-2-1.jpg 685w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-2-1-300x131.jpg 300w\" sizes=\"auto, (max-width: 685px) 100vw, 685px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"62\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-3-1.jpg\" alt=\"output 3\" class=\"wp-image-13517\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-3-1.jpg 689w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-3-1-300x27.jpg 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"688\" height=\"109\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-4-1.jpg\" alt=\"output 4\" class=\"wp-image-13518\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-4-1.jpg 688w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/output-4-1-300x48.jpg 300w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Add negative scopes to all enum values<\/h3>\n\n\n\n<p>Rails enum has been very popular among Rails developers especially for generated named scope. So far there to get negative scope we need to use where.not with a positive scope which now supported by<strong><code> not_*<\/code><\/strong> scopes generated by <strong><code>enum<\/code><\/strong><\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/748f97d0d31be90715ad836d370e3e32.js\"><\/script><\/p>\n\n\n\n<p>It is convenient when we want to disallow access in a controller, like<\/p>\n\n\n\n<p><code>Feed.not_trashed.find(params[:id])<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Implicit order column is now configurable<\/h3>\n\n\n\n<p>By default ActiveRecord sorts records by primary key, so when calling ordered finder methods such as <strong>#first<\/strong> or <strong>#last<\/strong> without an explicit order clause. It may result in unpredictable and surprising behavior when the primary key is not an auto-incrementing integer, for example when it&#8217;s UUID.<\/p>\n\n\n\n<p>This change makes it possible to override the column used for implicit ordering such that it will return more predictable results when calling first and last methods.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/NaiyaShah-BTC\/c5db8fea137e9ae65093b95ef584878d.js\"><\/script><\/p>\n\n\n\n<p>I hope this post helped you to start using new Rails 6 features. I would recommend checking out couple of more ActiveRecord methods added in Rails 6 in <a href=\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part 2<\/a>. and&nbsp; <a href=\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-3\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part 3<\/a>. Have a happy coding!<\/p>\n\n\n\n<p><a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Click here for more details&#8230;<\/strong><\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\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>In this article, we will look into some new ActiveRecord&#8230;<\/p>\n","protected":false},"author":24,"featured_media":13484,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-6482","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 - Part 1 - BoTree<\/title>\n<meta name=\"description\" content=\"There are many ActiveRecord changes in Rails 6. We will look into some of them which are as below. Negative scopes for all enum values and Configurable implicit order column.\" \/>\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-1\/\" \/>\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 - Part 1 - BoTree\" \/>\n<meta property=\"og:description\" content=\"There are many ActiveRecord changes in Rails 6. We will look into some of them which are as below. Negative scopes for all enum values and Configurable implicit order column.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\" \/>\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-04-30T04:39:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-28T12:12:56+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=\"Naiya Shah\" \/>\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=\"Naiya Shah\" \/>\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-1\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\"},\"author\":{\"name\":\"Naiya Shah\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c\"},\"headline\":\"Notable ActiveRecord changes in Rails 6 &#8211; Part 1\",\"datePublished\":\"2019-04-30T04:39:36+00:00\",\"dateModified\":\"2021-09-28T12:12:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\"},\"wordCount\":378,\"commentCount\":9,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#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-1\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\",\"name\":\"Notable ActiveRecord changes in Rails 6 - Part 1 - BoTree\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png\",\"datePublished\":\"2019-04-30T04:39:36+00:00\",\"dateModified\":\"2021-09-28T12:12:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c\"},\"description\":\"There are many ActiveRecord changes in Rails 6. We will look into some of them which are as below. Negative scopes for all enum values and Configurable implicit order column.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#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-1\/#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 &#8211; Part 1\"}]},{\"@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\/68f8340395086b417feb15b21211bf8c\",\"name\":\"Naiya Shah\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png\",\"caption\":\"Naiya Shah\"},\"description\":\"Naiya is a Ruby on Rails Developer. She developes applications with optimization and clean code with full Rspec coverage. She works in Javascript as well and she digs into anything new really quickly and comes up with a solution. Her leisure activities include travelling and watching movies.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Notable ActiveRecord changes in Rails 6 - Part 1 - BoTree","description":"There are many ActiveRecord changes in Rails 6. We will look into some of them which are as below. Negative scopes for all enum values and Configurable implicit order column.","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-1\/","og_locale":"en_US","og_type":"article","og_title":"Notable ActiveRecord changes in Rails 6 - Part 1 - BoTree","og_description":"There are many ActiveRecord changes in Rails 6. We will look into some of them which are as below. Negative scopes for all enum values and Configurable implicit order column.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2019-04-30T04:39:36+00:00","article_modified_time":"2021-09-28T12:12:56+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":"Naiya Shah","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Naiya Shah","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-1\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/"},"author":{"name":"Naiya Shah","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c"},"headline":"Notable ActiveRecord changes in Rails 6 &#8211; Part 1","datePublished":"2019-04-30T04:39:36+00:00","dateModified":"2021-09-28T12:12:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/"},"wordCount":378,"commentCount":9,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#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-1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/","url":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/","name":"Notable ActiveRecord changes in Rails 6 - Part 1 - BoTree","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2019\/05\/ruby-on-rails-activerecord.png","datePublished":"2019-04-30T04:39:36+00:00","dateModified":"2021-09-28T12:12:56+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/68f8340395086b417feb15b21211bf8c"},"description":"There are many ActiveRecord changes in Rails 6. We will look into some of them which are as below. Negative scopes for all enum values and Configurable implicit order column.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/notable-activerecord-changes-in-rails-6-part-1\/#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-1\/#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 &#8211; Part 1"}]},{"@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\/68f8340395086b417feb15b21211bf8c","name":"Naiya Shah","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/naiya-shah-150x150.png","caption":"Naiya Shah"},"description":"Naiya is a Ruby on Rails Developer. She developes applications with optimization and clean code with full Rspec coverage. She works in Javascript as well and she digs into anything new really quickly and comes up with a solution. Her leisure activities include travelling and watching movies."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6482","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\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=6482"}],"version-history":[{"count":3,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6482\/revisions"}],"predecessor-version":[{"id":16466,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/6482\/revisions\/16466"}],"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=6482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=6482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=6482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}