I have a user view and a rental view. In my rental view im trying to show the current users name. I think I am pretty close but I can\'t work out this last bit.
This ret
I think you should be able to do:
<%= f.select :user_id, User.find(f.object.user_id).collect {|t| [t.user_name, t.id]} %>
This does seem a little odd to me though. I'd have thought either:
f.object.user.user_name
and f.object.user.id
.current_user
.As an aside, I don't really understand why you want a select list just containing the current user - is that definitely what you're trying to achieve, or have I misunderstood?