The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Makes for some ugly SQL, but...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jason Perry

Posts: 34
Nickname: ambethia
Registered: Jul, 2007

Jason Perry is rubyist and lead developer for The Inspirit, LLC
Makes for some ugly SQL, but... Posted: Jun 19, 2008 7:53 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jason Perry.
Original Post: Makes for some ugly SQL, but...
Feed Title: Ambethia
Feed URL: http://ambethia.com/feed
Feed Description: The journal and personal website of Jason L Perry, dealing in development, design and distractions.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jason Perry
Latest Posts From Ambethia

Advertisement
class Listing < ActiveRecord::Base   belongs_to :book   belongs_to :guide     def <=>(other)     self.guide.name <=> other.guide.name   end end Book.find(1).listings.map{ |l| l.guide.name } # => ["XYZZY", "BAR", "FOO", "QUUX"] Book.find(1).listings.sort.map{ |l| l.guide.name } # => ["BAR", "FOO", "QUUX", "XYZZY"]   Nice.

Read: Makes for some ugly SQL, but...

Topic: Hash.new gives me a rash Previous Topic   Next Topic Topic: Rails - Super Simple Asynchronous Processing

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use