1
私のコードは、このルビーは
<div class="field form-group">
<%= f.label :date_of_birth %><br />
<%= date_select :date_of_birth, {order: [:month, :day, :year],
prompt: { day: 'Select day', month: 'Select month', year: 'Select year' },
start_year:1950, end_year: Date.today.year}, {required: true}, class: "form-control" %>
</div>
のように見え、その結果、私はその年の選択は、今まで1950年からのもので何をしたいです。このphoto
です。
ありがとうございました!
ここで、#の「未定義メソッドdate_of_birth」というエラーが表示されます。何が間違っていますか? –
Kristis
あなたの 'users'テーブルに' date_of_birth'という列がありますか? 'db/schema.rb'を見てください。 – MarsAtomic
いいえ、私はそれを持っていません。私はまだルビーの新作で、あなたはそれを手伝ってもらえますか? – Kristis