Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Pass instance to I18n when translating error #14141

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

printercu commented Feb 21, 2014

It'll allow to do like this:

# inside model that has .title
validates_numericality_of :quantity, greater_then: 0,
  title: ->(h) { h[:instance].title }

with translations

errors:
  models:
    my_model:
      greater_then: of %{title} must be greater than %{count}
Contributor

printercu commented Apr 10, 2016

closed with #24119

@printercu printercu closed this Apr 10, 2016

@printercu printercu reopened this Apr 10, 2016

@printercu Can this be closed now after #24119?

@printercu printercu closed this Apr 10, 2016

Contributor

printercu commented Apr 10, 2016

Yep, occasionally reopened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment