I use Spina CMS and he needs a routing mechanism to populate the front end from the back.
Therefore, I cannot interfere with this because I still need my CMS website, however I would like to add another action to my homepage / all pages in addition to what Spina does.
Is it possible?
Engine spina routes.rb:
Rails.application.routes.draw do
mount Spina::Engine => '/'
end
I want to add my own controller and action:
class Default::PagesController < ApplicationController
def homepage
@thisisavariable = "hello"
end
end
but if I add it to route.rb, it will overwrite Spina:
Rails.application.routes.draw do
get '/', to: 'default/pages#homepage'
mount Spina::Engine => '/'
end
source
share