Project

General

Profile

Actions

Defect #4563

closed

sort method not accepted.... in app/views/projects/settings/_members.rhtml:3

Added by yves dufour about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-01-13
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

ActionView::TemplateError (undefined method `<=>' for nil:NilClass) on line #3 of app/views/project...

app/models/member.rb:53:in `<=>'
app/views/projects/settings/_members.rhtml:3:in `sort'

giving up of the 'sort' , runs without any problem...

<% members = @project.member_principals.find(:all, :include => [:roles, :principal]) %>

as I mixed up some records in my DB after an upgrade, is it an error coming from bad records in DB or from some requirements ...

Actions #1

Updated by Jean-Philippe Lang about 14 years ago

  • Status changed from New to Closed
  • Resolution set to Wont fix

This error is raised because you have a Member without a valid Roles or Principal association in the database. Fixing #<=> is not the solution, you have to fix your data.

Actions #2

Updated by Jean-Philippe Lang about 14 years ago

You can use this to find your invalid entries in the members table:

Member.find(:all, :include => [:roles, :principal]).select {|m| m.roles.empty? || m.principal.nil?}
Actions

Also available in: Atom PDF