Answer the question
In order to leave comments, you need to log in
How to sort alphabetically in Ruby on Rails excluding something in a word?
Let's say there is an Address model, with name fields.
And there are such records:
Belova
st .
Aleksey
st
.
Answer the question
In order to leave comments, you need to log in
Ideally, put the address type in a separate field, but if you now need to organize a report in a quick way, you can use the power of postgresql (do you use it?)
This method will work slowly with large amounts of data. Would recommend to reconsider such approach to saving addresses. :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question