MishkaCmsMigration.Resources.Changes.Choices (Mishka CMS Migration v0.0.1)

Copy Markdown View Source

Folds what the New import window's steps ask apart from the run's Advanced options into the run's options: the bring argument (the switches of what to bring, such as "bring_posts" and "comments") and the language argument (the one language to put every item of an unknown or unpublished language in, blank to keep the source's languages), as the run's "one_language".

create :create do
  argument :bring, :map
  argument :language, :string
  change MishkaCmsMigration.Resources.Changes.Choices
end

It runs before the options are checked (MishkaCmsMigration.MigrationRun.Options), so a switch typed as "false" becomes a boolean and every key left alone keeps its default there. A language that is not one of the site's is refused in words, under the language field.