I was wondering… The newest version of rails has the form_tag helper
deprecated so I wanted to use the new form_for… I saw it done this way
ever since I needed to use Acts as Authenticated inside my application.
After some time I had the basic functionality up and running considering
the signup of new users. Now I run into the following problem:
<% form_for :tenant do |f| -%> <div> <label for="country">land</label> <%= f.text_field :country %> </div>
Above is part of the signup form I have created which uses the Acts as
Authenticated plugin… Now most of the fields work just fine, but the
country field is not inside the tenants table, but is linked trough a
country_id foreign key… Obviously the code above generates the error
that the country method is not found…
How can I make a join to the country table? The thing I have tried is
<% form_for :tenant do |f| -%> <div> <label for="country">land</label> <%= f.country.text_field :country %> </div>
and multiple variations on that theme… Any thoughts?
Thanks in advance…