samedi 20 mars 2021

Trying to set up route paths, getting no route match

I am having big issue setting up my views.. whenever I go on my page localhost/clear I get No route matches [GET] "/clear".

I have a folder named clear in my controllers with the controller files in it.

How do I set up this to be like:

localhost/clear as main view, 
and other one as
localhost/clear/connect
localhost/clear/test

clear.rb

class ClearController < ApplicationController  
    def index  
    end  
    end  

connect_controller.rb

class Clear::ConnectController< Clear::BaseController

    def index 
       @functions
end
end

routes.rb

  scope module: :clear, as: :clear do
    resources :connect, only: :index
    resources :test, only: :index

  end

Aucun commentaire:

Enregistrer un commentaire