When i get data from my db i use :order => “articles.title”
but then i get them like
Adam
Bono
Cecar
anna
How can i get the data like
Adam
anna
Bono
Cecar
not get them case-sensitive.
When i get data from my db i use :order => “articles.title”
but then i get them like
Adam
Bono
Cecar
anna
How can i get the data like
Adam
anna
Bono
Cecar
not get them case-sensitive.
Hi Mikael,
Mikael Björkegren wrote:
When i get data from my db i use :order => “articles.title”
How can i get the data likeAdam
anna
Bono
Cecar
Have you tried “articles.title.downcase” ? I’m not sure if it will work
inline in an order statement, but that’s what I’d try first. A second
solution would be to add a separate column to your table with the field
stored in that form to use in your finder.
Best regards,
Bill
Thanks that worked perfect.
Well in SQL you’d want to `ORDER BY LOWER(title) ASC’, so give :order
=> “LOWER(articles.title) ASC” a tryJason
On Tue, Jun 17, 2008 at 8:14 AM, Bill W. [email protected]
wrote:
anna
Bill
Well in SQL you’d want to `ORDER BY LOWER(title) ASC’, so give :order
=> “LOWER(articles.title) ASC” a try
Jason
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs