Sha256: 74b1c8703bef5fc6f92306fc8f0f3f86ccc4b7ffadfbe4a48bb5cd3c5b22ab9a
Contents?: true
Size: 606 Bytes
Versions: 1
Compression:
Stored size: 606 Bytes
Contents
module Appstats class Action < ActiveRecord::Base set_table_name "appstats_actions" # establish_connection "appstats_#{Rails.env}" if connection.nil? 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
appstats-0.22.0 | lib/appstats/action.rb |