Sha256: 2c585c7d537bdeac1589906b6f9a76716c412af8bf73dd38ff4fe49548d6fb32

Contents?: true

Size: 853 Bytes

Versions: 6

Compression:

Stored size: 853 Bytes

Contents

# require this file to load the tasks
require 'rake'

# Require sitemap_generator at runtime. If we don't do this the ActionView helpers are included
# before the Rails environment can be loaded by other Rake tasks, which causes problems
# for those tasks when rendering using ActionView.
namespace :settings do
  # Require sitemap_generator only. When installed as a plugin the require will fail, so in
  # that case, load the environment first.
  task :require do
    Rake::Task['environment'].invoke
  end

  desc "Dump settings to config/settings.yml"
  task :dump => ['settings:require'] do
    path = Settings.root_file_path.join('config/settings.yml')
    RailsAdminSettings::Dumper.dump(path)
    puts "dumped settings to #{path}"
  end

  desc "Delete all settings"
  task :delete => ['settings:require'] do
    Settings.destroy_all!
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_admin_settings-0.6.5 lib/rails_admin_settings/tasks.rb
rails_admin_settings-0.6.4 lib/rails_admin_settings/tasks.rb
rails_admin_settings-0.6.3 lib/rails_admin_settings/tasks.rb
rails_admin_settings-0.6.2 lib/rails_admin_settings/tasks.rb
rails_admin_settings-0.6.1 lib/rails_admin_settings/tasks.rb
rails_admin_settings-0.6.0 lib/rails_admin_settings/tasks.rb