Sha256: 6eea0c85c4d926e5481c98868b663f758b9bedba07219e01bd356fde73eeff4f
Contents?: true
Size: 791 Bytes
Versions: 10
Compression:
Stored size: 791 Bytes
Contents
class Members::PeopleController < Members::MembersController def update address = Address.unhash(person_params.delete("address_attributes")) @person = current_member.person results = @person.update_attributes(person_params) @person.delay.new_note("Member made the following changes from their dashboard: #{@person.previous_changes_sentence}", Time.now, nil, current_member.organization.id) @person.address.update_with_note(@person, nil, address, current_member.organization.time_zone, "member dashboard") 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,{})) end end
Version data entries
10 entries across 10 versions & 1 rubygems