Skip to content

Commit 46f5116

Browse files
committed
revises more Lint/EndAlignment offenses
1 parent d8fe252 commit 46f5116

File tree

8 files changed

+30
-30
lines changed

8 files changed

+30
-30
lines changed

actioncable/test/stubs/test_server.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ def initialize(subscription_adapter: SuccessAdapter)
1313
@config.use_faye = ENV["FAYE"].present?
1414
@config.client_socket_class = if @config.use_faye
1515
ActionCable::Connection::FayeClientSocket
16-
else
17-
ActionCable::Connection::ClientSocket
18-
end
16+
else
17+
ActionCable::Connection::ClientSocket
18+
end
1919

2020
@mutex = Monitor.new
2121
end
@@ -27,9 +27,9 @@ def pubsub
2727
def event_loop
2828
@event_loop ||= if @config.use_faye
2929
ActionCable::Connection::FayeEventLoop.new
30-
else
31-
ActionCable::Connection::StreamEventLoop.new
32-
end
30+
else
31+
ActionCable::Connection::StreamEventLoop.new
32+
end
3333
end
3434

3535
def worker_pool

actionmailer/lib/rails/generators/mailer/mailer_generator.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def file_name
2828
def application_mailer_file_name
2929
@_application_mailer_file_name ||= if mountable_engine?
3030
"app/mailers/#{namespaced_path}/application_mailer.rb"
31-
else
32-
"app/mailers/application_mailer.rb"
33-
end
31+
else
32+
"app/mailers/application_mailer.rb"
33+
end
3434
end
3535
end
3636
end

actionpack/lib/action_controller/metal/implicit_render.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def default_render(*args)
6161

6262
def method_for_action(action_name)
6363
super || if template_exists?(action_name.to_s, _prefixes)
64-
"default_render"
64+
"default_render"
6565
end
6666
end
6767

actionpack/lib/action_dispatch/journey/parser.rb

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actionpack/lib/action_dispatch/routing/mapper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,9 +1685,9 @@ def add_route(action, controller, options, _path, to, via, formatted, anchor, op
16851685

16861686
as = if !options.fetch(:as, true) # if it's set to nil or false
16871687
options.delete(:as)
1688-
else
1689-
name_for_action(options.delete(:as), action)
1690-
end
1688+
else
1689+
name_for_action(options.delete(:as), action)
1690+
end
16911691

16921692
path = Mapping.normalize_path URI.parser.escape(path), formatted
16931693
ast = Journey::Parser.parse path

actionpack/lib/action_dispatch/routing/polymorphic_routes.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ def handle_model(record)
248248
named_route = if model.persisted?
249249
args << model
250250
get_method_for_string model.model_name.singular_route_key
251-
else
252-
get_method_for_class model
253-
end
251+
else
252+
get_method_for_class model
253+
end
254254

255255
[named_route, args]
256256
end

actionview/lib/action_view/helpers/form_helper.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,9 @@ def apply_form_for_options!(record, object, options) #:nodoc:
468468

469469
options[:url] ||= if options.key?(:format)
470470
polymorphic_path(record, format: options.delete(:format))
471-
else
472-
polymorphic_path(record, {})
473-
end
471+
else
472+
polymorphic_path(record, {})
473+
end
474474
end
475475
private :apply_form_for_options!
476476

@@ -1574,12 +1574,12 @@ def fields_for(record_name, record_object = nil, fields_options = {}, &block)
15741574

15751575
record_name = if index
15761576
"#{object_name}[#{index}][#{record_name}]"
1577-
elsif record_name.to_s.end_with?("[]")
1578-
record_name = record_name.to_s.sub(/(.*)\[\]$/, "[\\1][#{record_object.id}]")
1579-
"#{object_name}#{record_name}"
1580-
else
1581-
"#{object_name}[#{record_name}]"
1582-
end
1577+
elsif record_name.to_s.end_with?("[]")
1578+
record_name = record_name.to_s.sub(/(.*)\[\]$/, "[\\1][#{record_object.id}]")
1579+
"#{object_name}#{record_name}"
1580+
else
1581+
"#{object_name}[#{record_name}]"
1582+
end
15831583
fields_options[:child_index] = index
15841584

15851585
@template.fields_for(record_name, record_object, fields_options, &block)

activerecord/lib/active_record/core.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ def inspect
503503
"#{name}: #{attribute_for_inspect(name)}"
504504
end
505505
end.compact.join(", ")
506-
else
507-
"not initialized"
508-
end
506+
else
507+
"not initialized"
508+
end
509509

510510
"#<#{self.class} #{inspection}>"
511511
end

0 commit comments

Comments
 (0)