On 12 March 2016 at 00:49, Donald Ziesig <don...@ziesig.org> wrote: > Hi All! > > I am trying to get a rails postgres table ordered by the exact values of the > ascii characters such that: > > <none> > Alpha > Bravo > Charlie > ... > > Unfortunately, even when I try to escape the < characters and enter them > directly in the Postgresql table, I get: > > Alpha > Bravo > * > * > * > Lima > Mike > <none> > November > Oscar > > I tried @@@@ in place of <none> and it is positioned as I expect, but @none@ > is handled the same as <none>. > > I've searched the web, but there are too many different solutions. It will > take me all day and night to try them out, > > Can anyone point me in the right direction?
possibly model.all.order(:name) where name is the column you want to sort on. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtfnSZA_wRd89AEPBZG0uJiEZgFNzveZihc1E60WS33qA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.