Sha256: eb89a5fc5160e46b63d7b54d48b2c598f2b36bdfa72eb3ce7df82a46c93dac88

Contents?: true

Size: 592 Bytes

Versions: 55

Compression:

Stored size: 592 Bytes

Contents

# bundle exec rake effective_pages:seed
namespace :effective_pages do
  task :seed => :environment do
    include EffectiveMenusHelper

    return true if Effective::Menu.find_by_title('main menu').present?

    Effective::Menu.new(:title => 'main menu').build do
      dropdown 'About' do
        item '111'
        item '222'
        dropdown 'More...' do
          item '333'
          item '444'
        end
      end

      dropdown 'Pages' do
        item 'AAA'
        divider
        item 'BBB'
        item 'CCC'
        divider
        item 'DDD'
      end
    end.save!

  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
effective_pages-1.3.2 lib/tasks/effective_pages_tasks.rake
effective_pages-1.3.1 lib/tasks/effective_pages_tasks.rake
effective_pages-1.3.0 lib/tasks/effective_pages_tasks.rake
effective_pages-2.1.0 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.9 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.8 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.7 lib/tasks/effective_pages_tasks.rake
effective_pages-1.2.0 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.6 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.5 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.4 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.3 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.2 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.1 lib/tasks/effective_pages_tasks.rake
effective_pages-1.1.9 lib/tasks/effective_pages_tasks.rake
effective_pages-2.0.0 lib/tasks/effective_pages_tasks.rake
effective_pages-1.1.8 lib/tasks/effective_pages_tasks.rake
effective_pages-1.1.7 lib/tasks/effective_pages_tasks.rake
effective_pages-1.1.6 lib/tasks/effective_pages_tasks.rake
effective_pages-1.1.5 lib/tasks/effective_pages_tasks.rake