0
0
Fork 0

Conditional validations no longer accept strings for if/unless (#3124)

This commit is contained in:
Matt Jankowski 2017-05-18 21:11:23 -04:00 committed by Eugen Rochko
parent d2542dcec0
commit 6e4c7d6211
6 changed files with 13 additions and 9 deletions

View file

@ -4,6 +4,6 @@ module ApplicationExtension
extend ActiveSupport::Concern
included do
validates :website, url: true, unless: 'website.blank?'
validates :website, url: true, if: :website?
end
end