Skip to content

Commit 65124c1

Browse files
committed
Standardrb lint
1 parent ea32952 commit 65124c1

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

lib/rails/generators/component/component_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ComponentGenerator < Rails::Generators::NamedBase
2222
class_option :skip_suffix, type: :boolean, default: false
2323

2424
def create_component_file
25-
template "component.rb", File.join(component_path, class_path, "#{file_name}#{options[:skip_suffix] ? "" : "_component"}.rb")
25+
template "component.rb", File.join(component_path, class_path, "#{file_name}#{"_component" unless options[:skip_suffix]}.rb")
2626
end
2727

2828
hook_for :test_framework

lib/view_component/collection.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
module ViewComponent
66
class Collection
77
include Enumerable
8+
89
attr_reader :component
910

1011
delegate :size, to: :@collection

lib/view_component/inline_template.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
module ViewComponent # :nodoc:
44
module InlineTemplate
55
extend ActiveSupport::Concern
6+
67
Template = Struct.new(:source, :language, :path, :lineno)
78

89
class_methods do

test/sandbox/test/preview_helper_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# rubocop:disable Style/MixinUsage
55
include PreviewHelper
66
# rubocop:enable Style/MixinUsage
7+
78
class PreviewHelperTest < ActiveSupport::TestCase
89
def test_returns_template_data_with_no_template
910
template_identifier = "preview/no_template"

0 commit comments

Comments
 (0)