Ruby on Rails Tuesday, March 28, 2017
hi,i am trying to use ror on a legacy system.--
belongs_to :ProvincialTaxAreaCode, class_name: "TaxArea", foreign_key: "ProvincialTaxAreaCode" #, primary_key: "ProvincialTaxAreaCode"
ProvincialTaxAreaCode is a varchar(20)
<select class="select optional form-control" name="record[ProvincialTaxAreaCode]" id="record_ProvincialTaxAreaCode"><option value=""></option>
<option value="1">test- 123</option></select>
ActiveRecord::AssociationTypeMismatch (TaxArea(#109333370) expected, got String(#70918210)):
how can i still use the varchar field without converting it???
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To post to this group, send email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMfbQiBLi9H7cY6ruYMUVnbC%3DDD-KU0zfkqxYw0HH6v73w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Posted by Ruby on Rails at 10:37 AM