Skip to content

Commit

Permalink
Merge pull request spree-contrib#150 from jeremyclark/master
Browse files Browse the repository at this point in the history
Don't overwrite user_params and instead add them to spree strong parameters
  • Loading branch information
damianlegawiec authored Mar 6, 2020
2 parents 4a5cb0a + 7eadcb8 commit 14a1ca6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/controllers/spree/admin/users_controller_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ def load_use_codes

@use_codes = SpreeAvataxOfficial::EntityUseCode.all.map { |use_code| ["#{use_code.code} - #{use_code.name}", use_code.id] }
end

def user_params
params.require(:user).permit(:avatax_entity_use_code_id, :exemption_number, :vat_id)
end
end
end
end
Expand Down
5 changes: 5 additions & 0 deletions config/initializers/spree_permitted_attributes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Spree
module PermittedAttributes
@@user_attributes.push :avatax_entity_use_code_id, :exemption_number, :vat_id
end
end

0 comments on commit 14a1ca6

Please sign in to comment.