How do I order a collection returned when I’ve accessed it from dot
notation? For example using client.products I’d like the return to be
ordered by product.part_number. I’ve tried to do this Ruby side with
something like client.products.sort {|a, b| a.part_number >
b.part_number} and I get an error. Any idea how to deal with this?
How do I order a collection returned when I’ve accessed it from dot
notation? For example using client.products I’d like the return to be
ordered by product.part_number. I’ve tried to do this Ruby side with
something like client.products.sort {|a, b| a.part_number >
b.part_number} and I get an error. Any idea how to deal with this?
–
Q. What’s a good holiday present for the serious Rails developer?
A. RUBY FOR RAILS by David A. Black (Ruby for Rails)
aka The Ruby book for Rails developers!
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)
It’s also in the development version of Ruby (1.9):
$ /usr/local/lib/ruby-cvs/bin/ruby -ve ‘p %w{ a b c }.map(&:upcase)’
ruby 1.9.0 (2006-12-09 patchlevel 0) [i686-linux]
[“A”, “B”, “C”]
David
–
Q. What’s a good holiday present for the serious Rails developer?
A. RUBY FOR RAILS by David A. Black (Ruby for Rails)
aka The Ruby book for Rails developers!
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)