Skip to content

Commit

Permalink
Make out-of-bounds error translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkp committed Mar 23, 2012
1 parent 13fa544 commit d803d18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/feature_point.rb
Expand Up @@ -4,7 +4,7 @@ class InRegionValidator < ActiveModel::Validator
def validate(record)
record.find_regions[0]
rescue IndexError
record.errors[:the_geom] << "Point doesn't fall within the defined regions"
record.errors[:the_geom] << I18n.t("feature.notice.out_of_bounds")
end
end

Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Expand Up @@ -19,6 +19,7 @@ en:
notice:
point_added: 'Thank you! Your point was added to the map. Please, share it with your friends.'
invalid: 'There are some errors with your point.'
out_of_bounds: "Point doesn't fall within the defined regions"
form:
header: 'Tell us more...'
title_label: Location Name
Expand Down

0 comments on commit d803d18

Please sign in to comment.