Skip to content

Commit bd4630f

Browse files
authored
Merge branch 'main' into add_pretty_generated_option_for_code_fields
2 parents 7756cb8 + 6bf1f7f commit bd4630f

24 files changed

+342
-218
lines changed

Gemfile.lock

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
avo (3.19.1)
4+
avo (3.19.3)
55
actionview (>= 6.1)
66
active_link_to
77
activerecord (>= 6.1)
@@ -131,7 +131,7 @@ GEM
131131
money-rails (~> 1.12)
132132
avo-record_link_field (0.0.2)
133133
aws-eventstream (1.3.2)
134-
aws-partitions (1.1080.0)
134+
aws-partitions (1.1084.0)
135135
aws-sdk-core (3.222.1)
136136
aws-eventstream (~> 1, >= 1.3.0)
137137
aws-partitions (~> 1, >= 1.992.0)
@@ -282,7 +282,7 @@ GEM
282282
railties (>= 5.0.0)
283283
faker (3.5.1)
284284
i18n (>= 1.8.11, < 2)
285-
faraday (2.12.2)
285+
faraday (2.13.0)
286286
faraday-net_http (>= 2.0, < 3.5)
287287
json
288288
logger
@@ -356,7 +356,7 @@ GEM
356356
activesupport (>= 3.0)
357357
nokogiri (>= 1.6)
358358
io-console (0.8.0)
359-
irb (1.15.1)
359+
irb (1.15.2)
360360
pp (>= 0.6.0)
361361
rdoc (>= 4.0.0)
362362
reline (>= 0.4.2)
@@ -390,7 +390,7 @@ GEM
390390
net-pop
391391
net-smtp
392392
mapkick-rb (0.1.5)
393-
mapkick-static (0.1.1)
393+
mapkick-static (0.2.0)
394394
marcel (1.0.4)
395395
matrix (0.4.2)
396396
memory_profiler (1.1.0)
@@ -527,7 +527,7 @@ GEM
527527
rainbow (>= 2.0, < 4.0)
528528
rexml (~> 3.1)
529529
regexp_parser (2.10.0)
530-
reline (0.6.0)
530+
reline (0.6.1)
531531
io-console (~> 0.5)
532532
responders (3.1.1)
533533
actionpack (>= 5.2)
@@ -555,23 +555,23 @@ GEM
555555
rspec-retry (0.6.2)
556556
rspec-core (> 3.3)
557557
rspec-support (3.13.2)
558-
rubocop (1.73.2)
558+
rubocop (1.75.2)
559559
json (~> 2.3)
560560
language_server-protocol (~> 3.17.0.2)
561561
lint_roller (~> 1.1.0)
562562
parallel (~> 1.10)
563563
parser (>= 3.3.0.2)
564564
rainbow (>= 2.2.2, < 4.0)
565565
regexp_parser (>= 2.9.3, < 3.0)
566-
rubocop-ast (>= 1.38.0, < 2.0)
566+
rubocop-ast (>= 1.44.0, < 2.0)
567567
ruby-progressbar (~> 1.7)
568568
unicode-display_width (>= 2.4.0, < 4.0)
569569
rubocop-ast (1.44.0)
570570
parser (>= 3.3.7.2)
571571
prism (~> 1.4)
572-
rubocop-performance (1.24.0)
572+
rubocop-performance (1.25.0)
573573
lint_roller (~> 1.1)
574-
rubocop (>= 1.72.1, < 2.0)
574+
rubocop (>= 1.75.0, < 2.0)
575575
rubocop-ast (>= 1.38.0, < 2.0)
576576
rubocop-shopify (2.16.0)
577577
rubocop (~> 1.62)
@@ -644,18 +644,18 @@ GEM
644644
actionpack (>= 6.1)
645645
activesupport (>= 6.1)
646646
sprockets (>= 3.0.0)
647-
standard (1.47.0)
647+
standard (1.49.0)
648648
language_server-protocol (~> 3.17.0.2)
649649
lint_roller (~> 1.0)
650-
rubocop (~> 1.73.0)
650+
rubocop (~> 1.75.2)
651651
standard-custom (~> 1.0.0)
652-
standard-performance (~> 1.7)
652+
standard-performance (~> 1.8)
653653
standard-custom (1.0.2)
654654
lint_roller (~> 1.0)
655655
rubocop (~> 1.50)
656-
standard-performance (1.7.0)
656+
standard-performance (1.8.0)
657657
lint_roller (~> 1.1)
658-
rubocop-performance (~> 1.24.0)
658+
rubocop-performance (~> 1.25.0)
659659
stringio (3.1.6)
660660
syntax_tree (6.2.0)
661661
prettier_print (>= 1.2.0)

app/controllers/avo/associations_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def index
2929
# When other field type, like has_many the @query is directly fetched from the parent record
3030
# Don't apply policy on array type since it can return an array of hashes where `.all` and other methods used on policy will fail.
3131
@query = if @field.type == "array"
32-
@resource.fetch_records(Avo::ExecutionContext.new(target: @field.block).handle || @parent_record.try(@field.id))
32+
@resource.fetch_records(Avo::ExecutionContext.new(target: @field.block, record: @parent_record).handle || @parent_record.try(@field.id))
3333
else
3434
@related_authorization.apply_policy(
3535
@parent_record.send(

gemfiles/rails_6.1_ruby_3.1.4.gemfile.lock

+15-15
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PATH
66
PATH
77
remote: ..
88
specs:
9-
avo (3.19.1)
9+
avo (3.19.3)
1010
actionview (>= 6.1)
1111
active_link_to
1212
activerecord (>= 6.1)
@@ -118,7 +118,7 @@ GEM
118118
money-rails (~> 1.12)
119119
avo-record_link_field (0.0.2)
120120
aws-eventstream (1.3.2)
121-
aws-partitions (1.1080.0)
121+
aws-partitions (1.1084.0)
122122
aws-sdk-core (3.222.1)
123123
aws-eventstream (~> 1, >= 1.3.0)
124124
aws-partitions (~> 1, >= 1.992.0)
@@ -268,7 +268,7 @@ GEM
268268
railties (>= 5.0.0)
269269
faker (3.5.1)
270270
i18n (>= 1.8.11, < 2)
271-
faraday (2.12.2)
271+
faraday (2.13.0)
272272
faraday-net_http (>= 2.0, < 3.5)
273273
json
274274
logger
@@ -341,7 +341,7 @@ GEM
341341
activesupport (>= 3.0)
342342
nokogiri (>= 1.6)
343343
io-console (0.8.0)
344-
irb (1.15.1)
344+
irb (1.15.2)
345345
pp (>= 0.6.0)
346346
rdoc (>= 4.0.0)
347347
reline (>= 0.4.2)
@@ -375,7 +375,7 @@ GEM
375375
net-pop
376376
net-smtp
377377
mapkick-rb (0.1.5)
378-
mapkick-static (0.1.1)
378+
mapkick-static (0.2.0)
379379
marcel (1.0.4)
380380
matrix (0.4.2)
381381
memory_profiler (1.1.0)
@@ -501,7 +501,7 @@ GEM
501501
rainbow (>= 2.0, < 4.0)
502502
rexml (~> 3.1)
503503
regexp_parser (2.10.0)
504-
reline (0.6.0)
504+
reline (0.6.1)
505505
io-console (~> 0.5)
506506
responders (3.1.1)
507507
actionpack (>= 5.2)
@@ -529,23 +529,23 @@ GEM
529529
rspec-retry (0.6.2)
530530
rspec-core (> 3.3)
531531
rspec-support (3.13.2)
532-
rubocop (1.73.2)
532+
rubocop (1.75.2)
533533
json (~> 2.3)
534534
language_server-protocol (~> 3.17.0.2)
535535
lint_roller (~> 1.1.0)
536536
parallel (~> 1.10)
537537
parser (>= 3.3.0.2)
538538
rainbow (>= 2.2.2, < 4.0)
539539
regexp_parser (>= 2.9.3, < 3.0)
540-
rubocop-ast (>= 1.38.0, < 2.0)
540+
rubocop-ast (>= 1.44.0, < 2.0)
541541
ruby-progressbar (~> 1.7)
542542
unicode-display_width (>= 2.4.0, < 4.0)
543543
rubocop-ast (1.44.0)
544544
parser (>= 3.3.7.2)
545545
prism (~> 1.4)
546-
rubocop-performance (1.24.0)
546+
rubocop-performance (1.25.0)
547547
lint_roller (~> 1.1)
548-
rubocop (>= 1.72.1, < 2.0)
548+
rubocop (>= 1.75.0, < 2.0)
549549
rubocop-ast (>= 1.38.0, < 2.0)
550550
rubocop-shopify (2.16.0)
551551
rubocop (~> 1.62)
@@ -617,18 +617,18 @@ GEM
617617
actionpack (>= 6.1)
618618
activesupport (>= 6.1)
619619
sprockets (>= 3.0.0)
620-
standard (1.47.0)
620+
standard (1.49.0)
621621
language_server-protocol (~> 3.17.0.2)
622622
lint_roller (~> 1.0)
623-
rubocop (~> 1.73.0)
623+
rubocop (~> 1.75.2)
624624
standard-custom (~> 1.0.0)
625-
standard-performance (~> 1.7)
625+
standard-performance (~> 1.8)
626626
standard-custom (1.0.2)
627627
lint_roller (~> 1.0)
628628
rubocop (~> 1.50)
629-
standard-performance (1.7.0)
629+
standard-performance (1.8.0)
630630
lint_roller (~> 1.1)
631-
rubocop-performance (~> 1.24.0)
631+
rubocop-performance (~> 1.25.0)
632632
syntax_tree (6.2.0)
633633
prettier_print (>= 1.2.0)
634634
terminal-table (4.0.0)

0 commit comments

Comments
 (0)