Sha256: 486e9e7674ef49b6edb562bd2a7c4be12e29c44c749412629f1798ac08154bbf
Contents?: true
Size: 483 Bytes
Versions: 9
Compression:
Stored size: 483 Bytes
Contents
class INE::Places::AutonomousRegion < OpenStruct include INE::Places::CSVRecord def provinces INE::Places::Province.find_all_by_autonomous_region_id(self.id) end private def self.collection_klass INE::Places::AutonomousRegionsCollection end def self.filter(records, name) return [] if name.blank? parameterized_name = name.parameterize records.select{|a| a.slug.include?(parameterized_name) }. sort_by{|a| a.name.parameterize } end end
Version data entries
9 entries across 9 versions & 1 rubygems