app/strategies/meeting_reservation_updater.rb
# Creates a new MeetingReservation row given the parameters.
# This method updates also the internal SQL diff log file.
#
# == Returns:
#
# The specified MeetingReservation instance (which will result created only when successful).
# nil only in case of no-ops.
#
Creates a new MeetingReservation row given the parameters.
This method updates also the internal SQL diff log file.



The specified MeetingReservation instance (which will result created only when successful).
nil only in case of no-ops.
Creates a new MeetingReservation row given the parameters . This method updates also the internal SQL diff log file . The specified MeetingReservation instance ( which will result created only when successful ) . nil only in case of no - ops .
def create_new_header_row!( meeting_id, badge, is_not_coming = false, has_confirmed = false,
                              notes = nil )
    return nil unless meeting_id.present? && badge.instance_of?(Badge)
    mrs = MeetingReservation.new(
      meeting_id:       meeting_id,
      team_id:          badge.team_id,
      swimmer_id:       badge.swimmer_id,
      badge_id:         badge.id,
      is_not_coming:    is_not_coming,
      has_confirmed:    has_confirmed,
      notes:            notes,
      user_id:          @current_user.id
    )
    mrs.save!
    sql_diff_text_log << to_sql_insert( mrs, false, "\r\n" )
    mrs
  end
def create_new_header_row! ( meeting_id , badge , is_not_coming = false , has_confirmed = false , notes = nil ) return nil unless meeting_id . present? && badge . instance_of? ( Badge ) mrs = MeetingReservation . new ( meeting_id : meeting_id , team_id : badge . team_id , swimmer_id : badge . swimmer_id , badge_id : badge . id , is_not_coming : is_not_coming , has_confirmed : has_confirmed , notes : notes , user_id : @current_user . id ) mrs . save! sql_diff_text_log << to_sql_insert ( mrs , false , "\r\n" ) mrs end
Creates a new MeetingReservation row given the parameters.
Creates a new MeetingReservation row given the parameters .
# DEBUG #    puts "before Res (header) SAVE!" #    puts ValidationErrorTools.recursive_error_for( mrs ) unless mrs.valid? # Store Db-diff text for INSERT
meeting_id
<not_specific>
badge
<not_specific>
is_not_coming
<not_specific>
has_confirmed
<not_specific>
notes
<not_specific>