Open Rubioli opened 8 years ago
I have added new column to my comments database called is_image and it's a boolean.
comments
is_image
boolean
In my form I have added: = f.input :is_image
= f.input :is_image
And in my controller, I have added it inside comment_params, permit.
comment_params
permit
But even when it's checked in form, is_image is still false in my database.
false
How can I fix it so when is_image is checked it changes false to true.
true
Thanks in advanced!
Did you resolve this? I am trying to add a column to my comments table too and experiences the same thing
I have added new column to my
comments
database calledis_image
and it's aboolean
.In my form I have added:
= f.input :is_image
And in my controller, I have added it inside
comment_params
,permit
.But even when it's checked in form,
is_image
is stillfalse
in my database.How can I fix it so when
is_image
is checked it changesfalse
totrue
.Thanks in advanced!