I am developing based on Ruby on Rails tutorial by Michael Hartl, with the help of Devise and Forem. The code is visible at https://github.com/fchampreux/ODQ_Web. The web site is visible at http://www.opendataquality.org
In my header, I included an image:
<header>
...
<div class="row">
<div class="col-md-3">
<h5><img style="position:relative; left:10px; top:10px; vertical-align:bottom" alt="ODQ Logo" src="assets/ODQ_Logo.png"></h5>
</div>
...
It works fine, and generates following html code for each one of my pages:
<img style="position:relative; left:10px; top:10px; vertical-align:bottom" alt="ODQ Logo" src="assets/ODQ_Logo.png">
All the pages that are static are in a dedicated folder, and produced by the static_pages_controller. Each of them renders correctly the image.
The dynamic page produced by Forem does not render the image. This page actually is not directly listed in the routes.rb nor in a controller.
routes.rb
ODQWeb::Application.routes.draw do
# This line mounts Forem's routes at /forums by default.
# This means, any requests to the /forums URL of your application will go to Forem::ForumsController#index.
# If you would like to change where this extension is mounted, simply change the :at option to something different.
#
# We ask that you don't use the :as option here, as Forem relies on it being the default of "forem"
mount Forem::Engine, :at => '/forums'
devise_for :users
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
root to: 'static_pages#welcome'
get '/welcome', to: 'static_pages#welcome'
get '/partners', to: 'static_pages#partners'
get '/careers', to: 'static_pages#careers'
get '/products', to: 'static_pages#products'
get '/services', to: 'static_pages#services'
get '/solutions', to: 'static_pages#solutions'
end
The Forem initializer is configured for application layout:
config/initializers/forem.rb
Rails.application.config.to_prepare do
Forem.layout = "application"
end
Can you please help me to understand and solve this issue ?