Class: Appstats::ContextValue
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Appstats::ContextValue
- Defined in:
- lib/appstats/context_value.rb
Class Method Summary collapse
Class Method Details
.update_context_values ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/appstats/context_value.rb', line 8 def self.update_context_values sql = "select distinct(context_value) from appstats_contexts where context_value not in (select name from appstats_context_values)" count = 0 Appstats.connection.execute(sql).each do |row| Appstats::ContextValue.create(:name => row[0], :status => 'derived') count += 1 end count end |