Rails input form boolean -


i got problem make form can chose between true or false.
in model ticket got:
type:boolean

when i'm making check_box in form got error msg:

invalid single-table inheritance type: 1 not subclass of ticket

my form code:
<%= form_for [@movie, @seance, @ticket] |f| %>
<div>
<%= f.label :type %>
<%= f.check_box :type %>
<%end%>

type reserved word in ruby-on-rails, used sti.

change column name to, say, :ticket_type


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -