Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- validates_each :email_subject, :email_content do |record, attr, value|
- if record.changed.include?(attr)
- record.errors.add attr, "Upgrade your subscription to customize the #{attr}"
- end
- raise 'wtf'
- end
Add Comment
Please, Sign In to add comment