Sha256: 8f292ecc74b88f1964b3dd462aafb8f4d7698ec3833c1054076c404630218e03

Contents?: true

Size: 350 Bytes

Versions: 1

Compression:

Stored size: 350 Bytes

Contents

FactoryBot.define do
  factory :<%= name %>, class: <%= record.class %> do
  <% columns.each do |column| %>
    <% quote = FactoryGenerator::QUOTE_AROUND_VALUE_TYPES.include?(record.class.columns_hash[column].type) %>
    <%= "%-#{indent}s" % column %> <%== "'" if quote %><%== record.public_send(column) %><%== "'" if quote %>
  <% end %>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
factory_bot_generator-0.1.0 lib/factory_generator.erb