Skip to content

Instantly share code, notes, and snippets.

@StaverDmitry
Created November 16, 2017 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StaverDmitry/f7edd63196f0dfa3b7fbb477f9bf2457 to your computer and use it in GitHub Desktop.
Save StaverDmitry/f7edd63196f0dfa3b7fbb477f9bf2457 to your computer and use it in GitHub Desktop.
cancellation_fees_params.map do |c_f_params|
fee = CancellationFee.find_or_initialize_by(cancellable_id: c_f_params[:cancellable_id],
cancellable_type: c_f_params[:cancellable_type])
fee.assign_attributes(c_f_params)
fee.save
fee
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment