views:

9

answers:

0

I'm a bit stuck on a 'has_one' and 'belongs_to' relationship and getting it to properly display in Formtastic. I have a person model that has one picture (a profile picture). I want the user to be able to select the picture using radio buttons. So far, I have:

<% form.inputs do %>
  <%= form.input :picture, :as => :radio, :collection => @pictures %>
<% end %>

However, this fails (because the foreign key is stored on the 'belongs_to' side of associations in Rails. Any suggestions?