When using accepts_nested_attributes_for confirm in your request you are using _attributes. class User < ActiveRecord::Base accepts_nested_attributes_for :order end   request = {:user_id => ‘938475’, :order_attributes => {:amount => 234}} Notice the “_attributes” in :order_attributes. This system won’t work without it. :)

Many Ruby hash methods append a “!” to the method as a caution and indication the original object will be altered. Hash#keep_if doesn’t have this option and the docs read, “Deletes every key-value pair from hsh for which block evaluates to false.” This led me to believe the hash would be altered regardless of a keep_if! option. But… I was wrong. >> h = {one: 1, two: 2, three: 3} >> h.keep_if{|key| key == :one } >> h #=> {one: 1, two: 2, three: 3} One way around this is to assign an operator. >> h = {one: 1, two: 2, three: 3} >> new_hash = h.keep_if{|key| key == :one } >> new_hash #=> {one: 1} :)

Looking at Rails’ strong parameters we can assume there are many endpoints with different requirements. Today let’s look at three configurations we might consider inside a controller. # Params we query from an outside service def remote_user_params params.require(:user).permit( :id, :first_name, :last_name, :email ) end   # Nested params we obtain locally def local_user_params params.require(:user).permit( course: [:grade, :attendance, :awards] ) end   # Quick removal of a relation def delete_params params.permit(:course) end Surely there is a way to reduce this code into a single block, for now this is good enough. Strong parameters is flexible and these examples will hopefully help you consider how to permit different groups of parameters for different requests. :)