lib/permits/permission.rb in permits-0.3.0 vs lib/permits/permission.rb in permits-1.0.0

- old
+ new

@@ -15,10 +15,10 @@ validate :permits_is_permissable def permits_is_permissable return if Permits.config.permits&.include?(permits&.to_sym) - errors.add(:permits, "is not a valid permits for #{resource.class}") + errors.add(:permits, I18n.t("errors.invalid_permits_param", class: resource.class.name)) end scope :permits_any, -> { all } end end