Sha256: aca2e02d444d9aad9754eea0e0521e6efe31f38c64d3802f86a66d8ade3b4104

Contents?: true

Size: 413 Bytes

Versions: 168

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

# generado con pg_rails

FactoryBot.define do
  factory :<%= singular_table_name %> do<% factory_attributes.each do |a| %>
    <%= a %><% end %><% los_traits.each do |trait| %>

    trait :<%= trait[:atributo_name] %>_existente do
      <%= trait[:atributo_name] %> { nil }
      <%= trait[:atributo_name] %>_id { <%= trait[:clase] %>.pluck(:id).sample }
    end<% end %>
  end
end

Version data entries

168 entries across 168 versions & 2 rubygems

Version Path
pg_rails-7.6.23 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.22 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.22.pre.3 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.22.pre.2 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.22.pre.1 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.11 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.10 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.9 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.8 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.7 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.6 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.5 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.4 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.3 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.2 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.21.pre.1 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.20 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.19 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.6.18 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb