bullet-train-pro / bullet_train-action_models

Other
5 stars 1 forks source link

Add `do_not_create` option to `Actions::PerformsImport`. #25

Open andrewculver opened 1 year ago

andrewculver commented 1 year ago

When including Actions::PerformsImport, developers should also be able to call do_not_create and when they do this, instead of trying to create new records when a primary key ID isn't provided, it should reject them as invalid.

class SomeModel::ImportAction < ApplicationRecord
  include Actions::ProcessesAsync
  include Actions::PerformsImport
  do_not_create
  # 🚅 add concerns above.