I was reading about ActiveModel to ride rails without ActiveRecord,
but the documentation doesn’t include info about find, and how to
implement search functionality.
I need to do the following:
i have a simple controller which get 2 parameters (:country, :city)
i would like to implement a simple search which returns the
population of the city
How should I implement find in the model? The data is in plain text
files(don’t ask), and I can look up in it using country_city as key
and the population as value (simple hash).
How should I implement find in the model? The data is in plain text
files(don’t ask), and I can look up in it using country_city as key
and the population as value (simple hash).
How should I implement find in the model? The data is in plain text
files(don’t ask), and I can look up in it using country_city as key
and the population as value (simple hash).