ruby-on-railsdashing

rails 5 adding menu to dashing-rails layout


What is the best way to be able to add a similar layout to dashing dashboard, like we have in out application. I tried to add the same materalize layout I use throughout my application and it seems to be breaking on each link_to which I have in my main layout.

example of a broken link:

undefined local variable or method `edit_user_registration_path'

adding routes file portion as an example.

Rails.application.routes.draw do
  mount Dashing::Engine, at: Dashing.config.engine_path
  resources :bills
  resources :unit_types, :except => [:show]
end

so if I add link_to bills_path it results in error.


Solution

  • The answer is provided here.

    Link

    all that is needed is a link_to with main_app before the actual route.

    <%= link_to "About", main_app.about_path %>