Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/active_record_auditor/extensions/array.rb
Instance Method Summary collapse
Instance Method Details
#to_sql_columns ⇒ Object
13 14 15 |
# File 'lib/active_record_auditor/extensions/array.rb', line 13 def to_sql_columns "`#{self.join('`, `')}`" end |
#to_sql_values ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/active_record_auditor/extensions/array.rb', line 2 def to_sql_values tmp = self.map do |elem| if elem.nil? 'NULL' else "'#{elem}'" end end "#{tmp.join(', ')}" end |