Skip to content

Commit

Permalink
Use default Layout/HeredocIndentation config
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Mar 18, 2020
1 parent 68fbeeb commit 5a88647
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ Layout/FirstArrayElementIndentation:
Layout/FirstHashElementIndentation:
Enabled: false

Layout/HeredocIndentation:
EnforcedStyle: active_support

Layout/IndentationWidth:
Enabled: false

Expand Down
20 changes: 10 additions & 10 deletions lib/rails/generators/alchemy/essence/essence_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a88647

Please sign in to comment.