Skip to content

Commit

Permalink
Add permitted_attributes to readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Apr 11, 2024
1 parent 26548e3 commit bc82f51
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class MyPolicy < ApplicationPolicy
params.require(:special_key)
end
end

def permitted_attributes
%i[name other special_key]
end
end

class SomeController < ApplicationController
Expand Down

0 comments on commit bc82f51

Please sign in to comment.