@@ -347,6 +347,9 module IssuesHelper | |||
|
347 | 347 | |
|
348 | 348 | # Find the name of an associated record stored in the field attribute |
|
349 | 349 | def find_name_by_reflection(field, id) |
|
350 | unless id.present? | |
|
351 | return nil | |
|
352 | end | |
|
350 | 353 | association = Issue.reflect_on_association(field.to_sym) |
|
351 | 354 | if association |
|
352 | 355 | record = association.class_name.constantize.find_by_id(id) |
General Comments 0
You need to be logged in to leave comments.
Login now