Sha256: 9efb674cbed98958974a99ab50c615e29b2c742fa10eeba8c831efcce19df589

Contents?: true

Size: 1.08 KB

Versions: 54

Compression:

Stored size: 1.08 KB

Contents

Description:
  Generate a Bullet Train Join Model.

Example:
  E.g. Add project-specific tags to a project:

  Given the following example models:

    rails g super_scaffold Project Team name:text_field description:trix_editor
    rails g super_scaffold Projects::Tag Team name:text_field

  1️⃣  Use the standard Rails model generator to generate the join model:

    rails g model Projects::AppliedTag project:references tag:references

    👋 Don't run migrations yet! Sometimes Super Scaffolding updates them for you.

  2️⃣  Use `join-model` scaffolding to prepare the join model for use in `crud-field` scaffolding:

    rails g bullet_train:join_model Projects::AppliedTag project_id{class_name=Project} tag_id{class_name=Projects::Tag}

  3️⃣  Now you can use `crud-field` scaffolding to actually add the field to the form of the parent model:

    rails g super_scaffold:field Project tag_ids:super_select{class_name=Projects::Tag}

    👋 Heads up! There will be one follow-up step output by this command that you need to take action on.

  4️⃣  Now you can run your migrations.

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
bullet_train-super_scaffolding-1.10.0 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.9.0 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.8.5 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.8.4 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.8.3 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.8.2 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.8.1 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.8.0 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.23 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.22 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.21 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.20 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.19 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.18 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.17 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.16 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.15 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.14 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.13 lib/generators/super_scaffold/join_model/USAGE
bullet_train-super_scaffolding-1.7.12 lib/generators/super_scaffold/join_model/USAGE