Sha256: 567ad3a064ba826a064f47971f5761dcd14056dfa4913f1c69c0f0de96eb0c86

Contents?: true

Size: 341 Bytes

Versions: 7

Compression:

Stored size: 341 Bytes

Contents

# desc "Explaining what the task does"
# task :spud_blog do
#   # Task goes here
# end

namespace :tb_blog do

  task :apply_blog_keys => :environment do
    SpudPost.all.each do |post|
      if post.is_news?
        post.update_column(:blog_key, 'news')
      else
        post.update_column(:blog_key, 'blog')
      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tb_blog-1.3.3 lib/tasks/spud_blog_tasks.rake
tb_blog-1.3.2 lib/tasks/spud_blog_tasks.rake
tb_blog-1.3.1 lib/tasks/spud_blog_tasks.rake
tb_blog-1.3.0 lib/tasks/spud_blog_tasks.rake
tb_blog-1.3.0.beta1 lib/tasks/spud_blog_tasks.rake
tb_blog-1.2.1 lib/tasks/spud_blog_tasks.rake
tb_blog-1.2.0 lib/tasks/spud_blog_tasks.rake