我得到了:
尝试:时出现未初始化的常量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 :(得分:0)
有一个拼写错误:EUserPofile
- &gt; EUserProfile