Why cannot I use allow_blank together with_options?

10 views
Skip to first unread message

Thiago Guimarães

unread,
Dec 18, 2015, 10:39:12 AM12/18/15
to Ruby on Rails: Talk
Hi there,

I was using it on 4.1.7, but when I upgrade to 4.2.5 it does not work more :(

with_options allow_blank: true do |v|
  # ...
end


Is there a reason?

Thanks

Colin Law

unread,
Dec 18, 2015, 10:50:10 AM12/18/15
to Ruby on Rails: Talk
On 18 December 2015 at 14:18, Thiago Guimarães <thia...@gmail.com> wrote:
> Hi there,
>
> I was using it on 4.1.7, but when I upgrade to 4.2.5 it does not work more
> :(
>
> with_options allow_blank: true do |v|
> # ...
> end

That is not what with_options is for, it is for grouping conditional
validations. Show us the rest of the validation so we can see what
you are trying to do.

Colin
Reply all
Reply to author
Forward
0 new messages