Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

hzz7223591's Profile

GitHub User: hzz7223591

Comments by hzz7223591

Avatar

i have <%= button_to "游客入口", signup_path, :method=> :post %> and
def create

@user=params[:user] ? User.new(params[:user]) : User.new_guest
if @user.save
  flash[:success] ="注册成功"
  session[:user_id] = @user.id
  @user.type=workers
  redirect_to '/superadmins/inspect'
else
  render 'new'
end

end
but when i click button it can't creat a new guest.it just link to signup_path.Doesn't the method post work?