Sha256: 21c13da45ba21f944d94c3d8f13be60ea714d2fe8f70cbf02e6b9a65ae11884c
Contents?: true
Size: 536 Bytes
Versions: 63
Compression:
Stored size: 536 Bytes
Contents
module Appstats class Action < ActiveRecord::Base set_table_name "appstats_actions" attr_accessible :name, :plural_name, :status def self.update_actions sql = "select distinct(action) from appstats_entries where action not in (select name from appstats_actions)" count = 0 ActiveRecord::Base.connection.execute(sql).each do |row| Appstats::Action.create(:name => row[0], :plural_name => row[0].pluralize, :status => 'derived') count += 1 end count end end end
Version data entries
63 entries across 63 versions & 1 rubygems