Class: FeaturesTasks

Inherits:
Object
  • Object
show all
Defined in:
lib/features_tasks.rb

Class Method Summary collapse

Class Method Details

.titleizeObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/features_tasks.rb', line 4

def self.titleize
  # all sites
  Site.all.each do |site|
    site.features.all.each_with_index do |feature, idx|
      new = feature.name.titleize
      if new != feature.name
        f = site.features.find(feature.id)
        f.update_attributes :name => new
      end
    end
  end
end