Pass instance to I18n when translating error #14141

wants to merge 1 commit into from

4 participants


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

      greater_then: of %{title} must be greater than %{count}

closed with #24119

@printercu printercu closed this Apr 10, 2016
@printercu printercu reopened this Apr 10, 2016
Ruby on Rails member

@printercu Can this be closed now after #24119?

@printercu printercu closed this Apr 10, 2016

Yep, occasionally reopened

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