我正在学习 ruby on rails,嗯
我有白色的这段代码可以登录并验证编辑帖子,但我不知道如何注销,我只能登录,然后我不能注销,请帮帮我
class PostsController < ApplicationController
http_basic_authenticate_with :name => 'admin', :password => 'meteoro', :except => [:index, :show]
# GET /posts
# GET /posts.json
def index
@posts = Post.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @posts }
end
end
谢谢