Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

Undefined method 'permit' for Hash #103

Open
@tamagokun

Description

@tamagokun

Using Spree 3.1.0

Looking at https://github.com/spree-contrib/spree_address_book/blob/master/app/models/spree/order_decorator.rb#L76

when this method is getting passed attributes for an address, it is just a simple Hash of attributes, not a Parameters object from the controller. Wrapping the hash in ActionController::Parameters.new fixes this, but not sure if that is the fix.

    attributes = ActionController::Parameters.new(attributes.select{|k,v| v.present?}).permit(permitted_address_attributes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions