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.5.5 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.5.4 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.5.3 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.5.2 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.5.1 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.5.0 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.4.3 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.4.2 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.4.1 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.4.0 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.3.5 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.3.4 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.3.3 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.3.2 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.3.1 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.3.0 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.2.3 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.2.2 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.2.1 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
pg_rails-7.2.0 pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb