ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

JournalFormatter's named_association is hard coded to use the name attribute (Bug #623)


Added by Eric Davis at 2011-09-14 08:44 pm.


Status:Open Start date:2011-09-14
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Journals / History
Target version:-
Remote issue URL: Affected version:2.0.0

Description

journal_formatter.rb#default_formatters's named_association option is hard coded to use the record's name. Either we need to provide some way to configure this to use another field or document that it is a required as part of AAJ's API.

Thinking documenting it would be best and allow the most configurability:

AAJ consumer examples:

 1# model uses the subject field
 2def name
 3  subject
 4end
 5
 6# Custom method to block based on permissions
 7def name
 8  if allowed_to?(...)
 9    name
10  else
11    "You cannot see the real name" 
12  end
13end


History

Also available in: Atom PDF