Hi All,

I'm working with an API that returns me a collection of locations as a hash. I 
could just display things like @places[:feature][:name] etc, but that seems 
pretty ugly (and brittle) to me.

So I'm tempted to have a non-AR, non-persisted model class called Place. 

If I was writing this in Groovy I'd probably create a static method on Place - 
maybe loadPlaces(hash: placeHash) that would return a collection of place 
objects.

What would be the idiomatic Rails/Ruby approach to something like this? Would I 
just change the capitalization to have a Place.load_places(place_hash) method 
:) or would there be a more Ruby/Rails way of solving the problem?

Any input appreciated!

Best Wishes,
Peter

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to