Sometimes you need to apply a if or unless condition to many validations at once. Well heres how to do it in Rails
if: :is_admin?
if: "is_admin?"
if: Proc.new {|x| x.is_admin?}
Sometimes you need to apply a if or unless condition to many validations at once. Well heres how to do it in Rails
if: :is_admin?
if: "is_admin?"
if: Proc.new {|x| x.is_admin?}
Article Topic:Software Development - Ruby / Rails
Date:March 18, 2015
Want me to help develop your next Ruby-on-Rails project or application?
Contact Me