11 lines
221 B
Ruby
11 lines
221 B
Ruby
|
|
module JamRuby
|
||
|
|
class City < ActiveRecord::Base
|
||
|
|
|
||
|
|
self.table_name = 'cities'
|
||
|
|
|
||
|
|
def self.get_all(country, region)
|
||
|
|
self.where(countrycode: country).where(region: region).order('city asc').all
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|