vendredi 16 mars 2018

Routing Error uninitialized constant controller

Im am trying to learn Ruby on rails and i keep getting this error.

My controller is

class Clasa9Controller < ApplicationController
  def multimi
  end

  def progresii
  end

  def functii
  end

  def vectori
  end

  def trigonometrie
  end

  def geometrie
  end
end

clasa9.html.erb

 <button class="btn"><%= link_to "", multimi_path %></button>

rails routes:

multimi GET    /clasa_9/multimi(.:format)           clasa_9#multimi
               progresii GET    /clasa_9/progresii(.:format)         clasa_9#progresii
                 functii GET    /clasa_9/functii(.:format)           clasa_9#functii
                 vectori GET    /clasa_9/vectori(.:format)           clasa_9#vectori
           trigonometrie GET    /clasa_9/trigonometrie(.:format)     clasa_9#trigonometrie
               geometrie GET    /clasa_9/geometrie(.:format)         clasa_9#geometrie

and routes.rb

 get 'clasa_9/multimi', to:"clasa_9#multimi", as:"multimi"

  get 'clasa_9/progresii', to:"clasa_9#progresii", as:"progresii"

  get 'clasa_9/functii', to:"clasa_9#functii", as:"functii"

  get 'clasa_9/vectori', to:"clasa_9#vectori", as:"vectori"

  get 'clasa_9/trigonometrie',  to:"clasa_9#trigonometrie", as:"trigonometrie"

  get 'clasa_9/geometrie',  to:"clasa_9#geometrie", as:"geometrie"

  devise_for :users

  get 'pages/home'

  get 'pages/clasa9'

  get 'pages/clasa10'

  get 'pages/clasa11'

  get 'pages/clasa12'

  get 'pages/about'

  root 'pages#home'

and im am getting

Routing Error uninitialized constant Clasa9Controller

i tried to solve this by looking up what is already posted here but i just cant solve it.. i dont understand what i should change.

Aucun commentaire:

Enregistrer un commentaire