Sha256: 7a053f163b8c2269914a5e0a734b4a0b8bb700c63657466926bc087c2970f881

Contents?: true

Size: 749 Bytes

Versions: 3

Compression:

Stored size: 749 Bytes

Contents

class SortPagesDataset < Dataset::Base
  def load
    # TODO Investigate why inflectors are breaking here
    create_record :page, :one,
      :title  => 'One',
      :slug   => 'one',
      :breadcrumb => 'one',
      :position => 1
    
    create_record :page, :two,
      :title  => 'Two',
      :slug   => 'two',
      :breadcrumb => 'two',
      :position => 2,
      :parent => pages(:one)
      
    create_record :page, :three,
      :title  => 'Three',
      :slug   => 'three',
      :breadcrumb => 'three',
      :position => 3,
      :parent => pages(:one)
      
    create_record :page, :four,
      :title  => 'Four',
      :slug   => 'four',
      :breadcrumb => 'four',
      :position => 4,
      :parent => pages(:one)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
radiant-drag_order-extension-0.4.4 spec/datasets/sort_pages.rb
radiant-drag_order-extension-0.4.2 spec/datasets/sort_pages.rb
radiant-drag_order-extension-0.4.0.beta.2 spec/datasets/sort_pages.rb