Sha256: f0160940d7f31e6cae35937c807cc0a04474ebff71c1e8abbd0fe74fdcd812cb

Contents?: true

Size: 502 Bytes

Versions: 7

Compression:

Stored size: 502 Bytes

Contents

namespace :spina do

  desc "Generate all pages based on the theme config"
  task bootstrap: :environment do
    Spina::Account.first.save
  end

  desc "Update translations after adding locales"
  task update_translations: :environment do
    Spina.locales.each do |locale|
      Mobility.with_locale(locale) do

        Spina::Page.all.order(:id).each do |page|
          page.title = page.title(fallback: Mobility.new_fallbacks[locale])
          page.save
        end

      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spina-2.0.0.alpha lib/tasks/spina_tasks.rake
spina-1.2.0 lib/tasks/spina_tasks.rake
spina-1.1.4 lib/tasks/spina_tasks.rake
spina-1.1.3 lib/tasks/spina_tasks.rake
spina-1.1.2 lib/tasks/spina_tasks.rake
spina-1.1.1 lib/tasks/spina_tasks.rake
spina-1.1.0 lib/tasks/spina_tasks.rake