app/controllers/content_items_controller.rb
# This method is used to display any pages the prototype is not concerned with. It does this by fetching the page
# from the production site and rendering the response verbatim as HTML.
# NB: Any **NON-HTML** requests will **STILL BE RETURNED AS HTML**. An example of this is the Miller Columns for
# the browse pages, which rely on a JSON object being returned (but is currently broken, because the JSON is returned
# as text/html, not as JSON)
This method is used to display any pages the prototype is not concerned with. It does this by fetching the page
from the production site and rendering the response verbatim as HTML.
This method is used to display any pages the prototype is not concerned with . It does this by fetching the page from the production site and rendering the response verbatim as HTML .
def fall_through
    bypass_slimmer
    if CONTENT_TYPES.keys.include? params["format"]
      file = open("https://#{ENV['GOVUK_APP_DOMAIN']}#{request.fullpath}").read
      send_data file, type: CONTENT_TYPES[params["format"]], disposition: :inline
    else
      render html: raw_content_item_html.html_safe
    end
  end
def fall_through bypass_slimmer if CONTENT_TYPES . keys . include? params [ "format" ] file = open ( "https://#{ENV['GOVUK_APP_DOMAIN']}#{request.fullpath}" ) . read send_data file , type : CONTENT_TYPES [ params [ "format" ] ] , disposition : :inline else render html : raw_content_item_html . html_safe end end
This method is used to display any pages the prototype is not concerned with.
This method is used to display any pages the prototype is not concerned with .