E
E
eldar_web2017-08-14 16:28:30
MySQL
eldar_web, 2017-08-14 16:28:30

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

1 answer(s)
A
Artur Bordenyuk, 2017-08-14
@HighQuality

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 question

Ask a Question

731 491 924 answers to any question