CSC/ECE 517 Spring 2022 - E2239: Further refactoring and improvement of review mapping helper.rb: Difference between revisions
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
=== Problem: The method get_data_for_review_report violates the Expert pattern === | === Problem: The method get_data_for_review_report violates the Expert pattern === | ||
<code> get_data_for_review_report </code> passes back a data structure with multiple <code> response </code> objects to the <code> _review_report.html.erb </code> view. This violates the | <code>get_data_for_review_report</code> passes back a data structure with multiple <code>response</code> objects to the <code>_review_report.html.erb</code> view. This violates the Expert pattern, because the given view does not know how to break apart the structure passed to it. | ||
*''' Proposed Solution ''': | *''' Proposed Solution ''': <code>get_data_for_review_report</code> will be refactored to use partials, which |
Revision as of 22:55, 30 March 2022
Background
Problems and planned changes
Problem: The method get_data_for_review_report violates the Expert pattern
get_data_for_review_report
passes back a data structure with multiple response
objects to the _review_report.html.erb
view. This violates the Expert pattern, because the given view does not know how to break apart the structure passed to it.
- Proposed Solution :
get_data_for_review_report
will be refactored to use partials, which