RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: hzz7223591
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?
i have <%= button_to "游客入口", signup_path, :method=> :post %> and
def create
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?