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