Customize Rails Connector Views

Up to version 6.9.1 the following components of Infopark Rails Connector are shipped with customizable views. The CMS controller is always present.

  • CMS Controller (always present)
  • Search
  • Time Machine
  • Comments
  • Ratings
  • RSS feed
  • SEO sitemap
  • WebCRM integration

The view files are not located in your application directory, but are provided directly by the gem. The easiest way to change the output and appearance of a controller action is to create a view with a corresponding path and name in your application and thereby replace its previous definition. For example, for the action SearchController#search, you would need to create the file app/views/search/search.html.erb.

Predefined partials can be replaced, too. As a first step, it is recommended to get an overview of which partials exist in the Rails Connector gem and how they are used by other views or partials. To find out where the Rails Connector gem is installed on your machine, please run the following command:

$ gem which infopark_rails_connector

The views and partials of a controller are located in the subdirectory app/views/controller-name, for example app/views/search for the search views. Create a file in the corresponding subdirectory of the application to replace the packaged file of the same name.