So heres what I am trying to do:
I want a field that is text based, "a coupon code"
in a nested form.
So basically f.text_field :coupon
But that value should be a relationship to an item in a coupons
table, but not by id.
Coupon table could look like
|ID| CouponCode |
+--+------------+
|1 | a89sd9asda |
+--+------------+
and my main table would look like
|ID| OrderTitle | Coupon |
+--+------------+------------+
|1 | sdfsdfsdfd | a89sd9asda |
+--+------------+------------+
Is there a way in rails to link these two via a has_one and use a non ID field?