app/strategies/meeting_reservation_updater.rb
# Edits an existing detail MeetingReservation row.
# This method updates also the internal SQL diff log file.
#
# == Returns:
#
# The specified MeetingReservation instance.
# Returns +nil+ only in case of no-operations.
#
Edits an existing detail MeetingReservation row.
This method updates also the internal SQL diff log file.



The specified MeetingReservation instance.
Returns +nil+ only in case of no-operations.
Edits an existing detail MeetingReservation row . This method updates also the internal SQL diff log file . The specified MeetingReservation instance . Returns + nil + only in case of no - operations .
def edit_existing_header_row!( mrs, is_not_coming = false, has_confirmed = false, notes = nil )
    return nil unless mrs.instance_of?(MeetingReservation)
    if is_an_actual_header_update_of( mrs, is_not_coming, has_confirmed, notes )
      mrs.update!(
        is_not_coming:      is_not_coming,
        has_confirmed:      has_confirmed,
        notes:              notes,
        user_id:            @current_user.id
      )
      sql_attributes = mrs.attributes.select do |key|
        [ 'id', 'is_not_coming', 'has_confirmed', 'notes', 'user_id' ].include?( key.to_s )
      end
      sql_diff_text_log << to_sql_update( mrs, false, sql_attributes, "\r\n" )
    end
    mrs
  end
def edit_existing_header_row! ( mrs , is_not_coming = false , has_confirmed = false , notes = nil ) return nil unless mrs . instance_of? ( MeetingReservation ) if is_an_actual_header_update_of ( mrs , is_not_coming , has_confirmed , notes ) mrs . update! ( is_not_coming : is_not_coming , has_confirmed : has_confirmed , notes : notes , user_id : @current_user . id ) sql_attributes = mrs . attributes . select do | key | [ 'id' , 'is_not_coming' , 'has_confirmed' , 'notes' , 'user_id' ] . include? ( key . to_s ) end sql_diff_text_log << to_sql_update ( mrs , false , sql_attributes , "\r\n" ) end mrs end
Edits an existing detail MeetingReservation row.
Edits an existing detail MeetingReservation row .
# DEBUG #    puts "\r\nedit_existing_header_row!( mrs.id: #{ mrs.id } is_not_coming: #{ is_not_coming }, has_confirmed: #{ has_confirmed }, notes: '#{ notes }')" # DEBUG #      puts "before HEADER UPDATE!" # DEBUG #      puts "after HEADER UPDATE, resulting DIFF:" #      puts "\r\n------------8<----------\r\n#{ sql_diff_text_log }\r\n------------8<----------" #      puts "HEADER: #{ mrs.inspect }" #    else # (log no-op) # DEBUG #      puts "No actual changes detected. Skipping header update."
mrs
<not_specific>
is_not_coming
<not_specific>
has_confirmed
<not_specific>
notes
<not_specific>