Adding explicit labels with FormHelper

PHOTO EMBED

Fri Jun 17 2022 09:32:50 GMT+0000 (UTC)

Saved by @metamoni #ruby #rubyonrails

 <%= form_for :product do |f| %>
  <%= f.label :product_name, "Product name" %>
  <%= f.text_field :product_name %>
  <%= f.label :description, "Description" %>
  <%= f.text_field :description %>
  <%= f.label :available, "In stock" %>
  <%= f.check_box :available %>
  <%= f.submit "Save" %>
<% end %>
content_copyCOPY