Project

General

Profile

Actions

Defect #8932

closed

User.acts_as_customizable and association loading broken by Rails 2.3.11

Added by Thomas Löber almost 13 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
2011-07-28
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Assuming we have 8 UserCustomFields.

In Rails 2.3.5 we can write:

>> User.find_by_admin(1, :include => :custom_values).custom_values.size
=> 8

In Rails 2.3.11 this fails:

>> User.find_by_admin(1, :include => :custom_values).custom_values.size
=> 0

This is because the ActiveRecord association code tries to load rows with custom_values.customized_type = 'User'.

If we put acts_as_customizable from User and Group to Principal the :include option also works with Rails 2.3.11.


Files


Related issues

Related to Redmine - Defect #5434: Redmine 0.9.3 - HTTP500 when trying to filter users for adding to a groupClosedJean-Philippe Lang2010-05-04

Actions
Actions

Also available in: Atom PDF