Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Examle Rails locale YAML to customize Form Label names
~ form_for(@race) do |f|
~ if @race.errors.any?
#error_explanation
%h2 #{pluralize(@race.errors.count, "error")} prohibited this race from being saved:
%ul
~@race.errors.full_messages.each do |msg|
%li= msg
.field
=f.label :name
%br
=f.text_field :name
.field
=f.label :date
%br
=f.datetime_select :date
.field
=f.label :details
%br
=f.text_area :details, :rows => 3
.actions
=f.submit
en:
hello: "Hello world"
helpers:
label:
race:
name: "Race Name"
date: "Race Date"
details: "Race Details"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.