Sha256: 39ed221c3cd94e576bcd8aa3c7617f17767733b502456c02989ec2a48ddc5f8f
Contents?: true
Size: 777 Bytes
Versions: 18
Compression:
Stored size: 777 Bytes
Contents
# frozen_string_literal: true FactoryBot.define do factory :alchemy_element, class: "Alchemy::Element" do name { "article" } autogenerate_contents { false } association :page, factory: :alchemy_page trait :fixed do fixed { true } name { "right_column" } end trait :unique do unique { true } name { "header" } end trait :trashed do after(:create) do |element| element.update_column(:position, :null) end end trait :with_nestable_elements do name { "slider" } end trait :nested do association :parent_element, factory: :alchemy_element, name: "slider" name { "slide" } end trait :with_contents do autogenerate_contents { true } end end end
Version data entries
18 entries across 18 versions & 1 rubygems