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
Post a Comment