我與導軌練習,我的‘會話’的主題中,我得到的消息 「未定義的方法`會議」的ApplicationController中:類」
未定義的方法`會議「的ApplicationController中:
請幫我
這是代碼 *(控制器aplication)
class ApplicationController < ActionController::Base
session :session_key => 'ruby_cookies'
end
*(控制器,當我要創建的cookie)
class RegistroController < ApplicationController
def index
end
def login
if request.post?
p_user = User.new(params[:user])
user = User.find_by_nombre_and_password(p_user.nombre, p_user.password)
if user
session[:user_id] = user.id
flash[:notice] = "se ha identificado correctamente"
redirect_to home_url
else
flash[:notice] = "se incorrecto psps"
redirect_to login_url
end
end
end
def logout
session[:user_id] = nil
flash[:notice] = "adios sayonara"
redirect_to home_url
end
end