Class: CrawlStation::ApplicationRecord

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/crawl_station/application_record.rb

Direct Known Subclasses

Model::Cache, Model::Schedule

Class Method Summary collapse

Class Method Details

.database_configObject



9
10
11
# File 'lib/crawl_station/application_record.rb', line 9

def self.database_config
  CS::Utils.database_config(module_name)
end

.module_nameObject



13
14
15
# File 'lib/crawl_station/application_record.rb', line 13

def self.module_name
  name.to_s.split('::').first.underscore
end

.table_name_prefixObject



5
6
7
# File 'lib/crawl_station/application_record.rb', line 5

def self.table_name_prefix
  "#{module_name}_"
end