Skip to content

Commit

Permalink
fix nil exception in method sort
Browse files Browse the repository at this point in the history
  • Loading branch information
vhochstein committed May 26, 2012
1 parent 861000b commit 62a21e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_scaffold/data_structures/column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def initialize_sort
self.sort = false
else
if self.singular_association?
self.sort = {:method => "#{self.name}.to_label"}
self.sort = {:method => "#{self.name}.nil? ? '' : #{self.name}.to_label"}
elsif self.plural_association?
self.sort = {:method => "#{self.name}.join(',')"}
else
Expand Down

0 comments on commit 62a21e1

Please sign in to comment.