これは私の.erbファイルにあります:
<form method="post" action="/login" id="login" enctype="text/plain">
Username: <input type="text" id="username" placeholder="Enter username here">
Password: <input type="password" id="password" placeholder="Enter password here">
<%= @error (will display if wrong) %>
<input TYPE="button" VALUE="Submit" />
</form>
そして、これは私の.rbファイルにあります:
post '/login' do
#connects to database
if #connection successful
# does something
else
#do something else
end
end
ただし、[送信] ボタンをクリックしてログインしようとしても、何も起こりません。もともとデータベースに接続して情報をチェックしていたのですが、その後、エラーメッセージを特定の値に設定しようとしても機能しません。私はこれが私が見逃しているばかげたものであることを知っています。無いのはどの作品?(Eruby で Postgres を使用し、Heroku で実行しています。)