From 5a886472323b115355751402bee0a9a824266fba Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 18 Mar 2020 16:58:51 +0100 Subject: [PATCH] Use default Layout/HeredocIndentation config --- .rubocop.yml | 3 --- .../alchemy/essence/essence_generator.rb | 20 +++++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f30709f193..5536692e12 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -81,9 +81,6 @@ Layout/FirstArrayElementIndentation: Layout/FirstHashElementIndentation: Enabled: false -Layout/HeredocIndentation: - EnforcedStyle: active_support - Layout/IndentationWidth: Enabled: false diff --git a/lib/rails/generators/alchemy/essence/essence_generator.rb b/lib/rails/generators/alchemy/essence/essence_generator.rb index 0bb7617931..72688d8a4d 100644 --- a/lib/rails/generators/alchemy/essence/essence_generator.rb +++ b/lib/rails/generators/alchemy/essence/essence_generator.rb @@ -20,16 +20,16 @@ def create_model def act_as_essence essence_class_file = "app/models/#{@essence_name}.rb" essence_class = @essence_name.classify - inject_into_class essence_class_file, essence_class, <<-CLASSMETHOD - acts_as_essence( - # Your options: - # - # ingredient_column: [String or Symbol] - Specifies the column name you use for storing the content in the database. (Default :body) - # validate_column: [String or Symbol] - Which column should be validated. (Default: ingredient_column) - # preview_text_column: [String or Symbol] - Specifies the column for the preview_text method. (Default: ingredient_column) - # preview_text_method: [String or Symbol] - A method called on ingredient to get the preview text. (Default: ingredient_column) - ) -CLASSMETHOD + inject_into_class essence_class_file, essence_class, <<~CLASSMETHOD + acts_as_essence( + # Your options: + # + # ingredient_column: [String or Symbol] - Specifies the column name you use for storing the content in the database. (Default :body) + # validate_column: [String or Symbol] - Which column should be validated. (Default: ingredient_column) + # preview_text_column: [String or Symbol] - Specifies the column for the preview_text method. (Default: ingredient_column) + # preview_text_method: [String or Symbol] - A method called on ingredient to get the preview text. (Default: ingredient_column) + ) + CLASSMETHOD end def copy_templates