Langsung ke konten utama

Postingan

Menampilkan postingan dari November, 2011

Ruby on Rails 3 Form radio button, text_field, error_messages, date_select

<% form_for @user do |f| %><% if @user.errors.any? %>   <div class="error_messages"><h2>Form is invalid</h2><ul><% for message in @user.errors.full_messages %><li><%= message %></li><% end %></ul></div><% end %><p><%= f.label :email %><br /><%= f.text_field :email %></p><p><%= f.label :password %><br /><%= f.password_field :password %></p><p><%= f.label :password_confirmation %><br /><%= f.password_field :password_confirmation %></p><p><%= f.label :name %><br /><%= f.text_field :name %></p><p><%= f.label :address %><br /><%= f.text_field :address %></p><p><%= f.label :phone_number %><br /><%= f.text_field :phone_number %></p><p><%= f.label :birthday %><br /><%= f.date_select :birthday, :start_ye…