From c1e1709d6250bb76031dcf08911dc08ccaca2e51 Mon Sep 17 00:00:00 2001 From: Johny Ho Date: Fri, 3 Jan 2025 00:40:17 -0500 Subject: [PATCH] Change indentation when inserting into models --- .../superglue/install/install_generator.rb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/superglue_rails/lib/generators/superglue/install/install_generator.rb b/superglue_rails/lib/generators/superglue/install/install_generator.rb index 4d3e334d..0a35e040 100644 --- a/superglue_rails/lib/generators/superglue/install/install_generator.rb +++ b/superglue_rails/lib/generators/superglue/install/install_generator.rb @@ -99,17 +99,17 @@ def copy_js_files def add_member_methods inject_into_file "app/models/application_record.rb", after: "class ApplicationRecord < ActiveRecord::Base\n" do <<-RUBY - # This enables digging by index when used with props_template - # see https://thoughtbot.github.io/superglue/digging/#index-based-selection - def self.member_at(index) - offset(index).limit(1).first - end + # This enables digging by index when used with props_template + # see https://thoughtbot.github.io/superglue/digging/#index-based-selection + def self.member_at(index) + offset(index).limit(1).first + end - # This enables digging by attribute when used with props_template - # see https://thoughtbot.github.io/superglue/digging/#attribute-based-selection - def self.member_by(attr, value) - find_by(Hash[attr, value]) - end + # This enables digging by attribute when used with props_template + # see https://thoughtbot.github.io/superglue/digging/#attribute-based-selection + def self.member_by(attr, value) + find_by(Hash[attr, value]) + end RUBY end end