Skip to content

Commit 774be60

Browse files
committed
extract_inertia_share_option -> transform_inertia_share_option
1 parent be7c56b commit 774be60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/inertia_rails/controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def extract_inertia_share_options(props)
8383
raise ArgumentError, "You must not mix shared data and [:if, :unless, :only, :except] options, pass data as a hash or a block."
8484
end
8585

86-
extract_inertia_share_option(options, :only, :if)
87-
extract_inertia_share_option(options, :except, :unless)
86+
transform_inertia_share_option(options, :only, :if)
87+
transform_inertia_share_option(options, :except, :unless)
8888

8989
options.transform_values! do |filters|
9090
Array(filters).map!(&method(:filter_to_proc))
@@ -93,7 +93,7 @@ def extract_inertia_share_options(props)
9393
options
9494
end
9595

96-
def extract_inertia_share_option(options, from, to)
96+
def transform_inertia_share_option(options, from, to)
9797
if (from_value = options.delete(from))
9898
filter = InertiaRails::ActionFilter.new(from, from_value)
9999
options[to] = Array(options[to]).unshift(filter)

0 commit comments

Comments
 (0)