@@ -229,7 +229,7 class Issue < ActiveRecord::Base | |||||
229 | @custom_field_values = nil |
|
229 | @custom_field_values = nil | |
230 | result |
|
230 | result | |
231 | end |
|
231 | end | |
232 |
|
232 | |||
233 | def description=(arg) |
|
233 | def description=(arg) | |
234 | if arg.is_a?(String) |
|
234 | if arg.is_a?(String) | |
235 | arg = arg.gsub(/(\r\n|\n|\r)/, "\r\n") |
|
235 | arg = arg.gsub(/(\r\n|\n|\r)/, "\r\n") | |
@@ -510,7 +510,7 class Issue < ActiveRecord::Base | |||||
510 | def relations |
|
510 | def relations | |
511 | @relations ||= (relations_from + relations_to).sort |
|
511 | @relations ||= (relations_from + relations_to).sort | |
512 | end |
|
512 | end | |
513 |
|
513 | |||
514 | # Preloads relations for a collection of issues |
|
514 | # Preloads relations for a collection of issues | |
515 | def self.load_relations(issues) |
|
515 | def self.load_relations(issues) | |
516 | if issues.any? |
|
516 | if issues.any? | |
@@ -520,7 +520,7 class Issue < ActiveRecord::Base | |||||
520 | end |
|
520 | end | |
521 | end |
|
521 | end | |
522 | end |
|
522 | end | |
523 |
|
523 | |||
524 | # Finds an issue relation given its id. |
|
524 | # Finds an issue relation given its id. | |
525 | def find_relation(relation_id) |
|
525 | def find_relation(relation_id) | |
526 | IssueRelation.find(relation_id, :conditions => ["issue_to_id = ? OR issue_from_id = ?", id, id]) |
|
526 | IssueRelation.find(relation_id, :conditions => ["issue_to_id = ? OR issue_from_id = ?", id, id]) | |
@@ -850,7 +850,7 class Issue < ActiveRecord::Base | |||||
850 | end |
|
850 | end | |
851 | end |
|
851 | end | |
852 | end |
|
852 | end | |
853 |
|
853 | |||
854 | # Callback on attachment deletion |
|
854 | # Callback on attachment deletion | |
855 | def attachment_added(obj) |
|
855 | def attachment_added(obj) | |
856 | if @current_journal && !obj.new_record? |
|
856 | if @current_journal && !obj.new_record? |
General Comments 0
You need to be logged in to leave comments.
Login now