Class: TrkDatatables::CalculatedInDb

Inherits:
Object
  • Object
show all
Defined in:
lib/trk_datatables/column_key_options.rb

Overview

rubocop:disable Metrics/ClassLength

Class Method Summary collapse

Class Method Details

.determine_db_type_for_columnObject



8
9
10
11
# File 'lib/trk_datatables/column_key_options.rb', line 8

def self.determine_db_type_for_column
  # converts TrkDatatables::IntegerCalculatedInDb to :integer
  name.sub("TrkDatatables::", "").sub("CalculatedInDb", "").downcase.to_sym
end

.human_attribute_name(column_name) ⇒ Object



4
5
6
# File 'lib/trk_datatables/column_key_options.rb', line 4

def self.human_attribute_name(column_name)
  column_name
end