Instead of passing the complete XML response to the page, only the part where the interesting fields for a course are stored should be passed as a parameter. It also shortens the code in the html.erb file that is necessary to pull out the wanted fields.
7 lines
336 B
Plaintext
7 lines
336 B
Plaintext
<% if @course != nil %>
|
|
<%-# TODO parse more fields and style them appropriately -%>
|
|
<h2><%= @course['title']['en'] %></h2>
|
|
<h5><%= @course['courseType'] %> <%= @course['semesterCode'] %></h5>
|
|
<%= button_to 'Add to favorites', action: :add_to_fav, number: @course['courseNumber'], semester: @course['semesterCode'] %>
|
|
<% end %>
|