ryanmoran/morpheus — Issue #3: NoMethodError: undefined method `<=>' for nil:NilClass
Author: smlsml
Created: 2012-01-26 22:48:23+00:00
State: open

This is similar to my other issue Student <=> Student

Usage:
@students.sort { |a,b| a.first_name.to_s <=> b.first_name.to_s }.each do |student|

Backtrace:

> vendor/bundle/ruby/1.8/gems/morpheus-0.3.6/lib/morpheus/associations/association.rb:104:in 'sort'
> vendor/bundle/ruby/1.8/gems/morpheus-0.3.6/lib/morpheus/associations/association.rb:104:in 'send'
> vendor/bundle/ruby/1.8/gems/morpheus-0.3.6/lib/morpheus/associations/association.rb:104:in 'method_missing'