Sha256: 097aa28ac05f53f66df8311895803e7da3c30d5a12f2c463d40b86c1e3fa8ba5
Contents?: true
Size: 313 Bytes
Versions: 1
Compression:
Stored size: 313 Bytes
Contents
require 'active_record' module CustomHelpers def to_array_by_keys(keys) values = [] obj_keys = self.attributes.keys keys.each do |key| values << self.send(key) if obj_keys.include?(key.to_s) end values end end module ActiveRecord class Base prepend CustomHelpers end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
easytable-0.0.2 | lib/easytable/active_record.rb |