Skip to content

Commit e487b0e

Browse files
committed
Allow custom permit
1 parent 810b881 commit e487b0e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/active_interaction/extras/strong_params.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ def permission_for_filter(filter, name = filter.name)
6969
when ActiveInteraction::HashFilter, ActiveInteraction::ObjectFilter
7070
{ name => {} }
7171
else
72-
name
72+
if permit == true
73+
name
74+
else
75+
{ name => permit }
76+
end
7377
end
7478
end
7579
end

0 commit comments

Comments
 (0)