Skip to content

Instantly share code, notes, and snippets.

View cheald's full-sized avatar

Chris Heald cheald

View GitHub Profile
module Validatable
def errors
@errors ||= Validatable::Errors.new(self)
end
class ValidationBase #:nodoc:
def try_translation(key)
begin
::I18n.translate!(key, :scope => "activerecord")
rescue ::I18n::ArgumentError