2016-10-17 2 views
0

Я получаю:Как исправить UNINITIALIZED Constant в контроллере

неинициализированным постоянная ProfilesController :: EUserPofile

ошибку при попытке:

class ProfilesController < ApplicationController 
    def index 
    #@profiles = EUserProfile.all 
    end 

    def preview 
    @profiles = EUserPofile.all 
    end 

end 

он отлично работает для индекса но для предварительного просмотра он падает.

вот мой маршрут файла:

Rails.application.routes.draw do 
    # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html 
    get 'welcome', to: 'pages#home' 
    get 'profiles', to: 'profiles#index' 
    get 'login', to: 'login#login' 

    resources :profiles do 
    get 'preview', on: :member 
    end 

end 
+0

Конечно его не 'EUserProfile'? – max

ответ

0

Там опечатка: EUserPofile ->EUserProfile

+1

Спасибо TT_TT –

Смежные вопросы