class Members::PeopleController < Members::MembersController def update @person = current_member.person @person.update_attributes(person_params) flash[:notice] = "Your changes have been saved." redirect_to members_root_path end private def person_params @person_params ||= params.fetch((:person),{}).merge(params.fetch(:company, {})).merge(params.fetch(:individual,{})) unless @person_params['addresses_attributes'].nil? @person_params['addresses_attributes'].each do |key, address| address[:member_update] = '1' end end @person_params end end