Skip to content

Commit 31558c4

Browse files
committed
Make a Rubocop exception because the pipeline style looks nice
1 parent 27c4739 commit 31558c4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

lib/inertia_rails/renderer.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,20 @@ def merge_props(shared_props, props)
9090
end
9191

9292
def computed_props
93+
# rubocop:disable Style/MultilineBlockChain
9394
merge_props(shared_data, props)
94-
# Always keep errors in the props
95-
.then do |merged_props|
95+
.then do |merged_props| # Always keep errors in the props
9696
if merged_props.key?(:errors) && !merged_props[:errors].is_a?(BaseProp)
9797
errors = merged_props[:errors]
9898
merged_props[:errors] = InertiaRails.always { errors }
9999
end
100100
merged_props
101101
end
102-
# Internal hydration/filtering
103-
.then { |props| deep_transform_props(props) }
104-
# Apply user-defined prop transformer
105-
.then { |props| configuration.prop_transformer(props: props) }
106-
# Add meta tags last (never transformed)
107-
.tap { |props| props[:_inertia_meta] = meta_tags if meta_tags.present? }
102+
.then { |props| deep_transform_props(props) } # Internal hydration/filtering
103+
.then { |props| configuration.prop_transformer(props: props) } # Apply user-defined prop transformer
104+
.tap { |props| props[:_inertia_meta] = meta_tags if meta_tags.present? } # Add meta tags last (never transformed)
105+
106+
# rubocop:enable Style/MultilineBlockChain
108107
end
109108

110109
def page

0 commit comments

Comments
 (0)