Frederick Cheung wrote:
> On 2 Dec 2008, at 17:24, Corey Murphy wrote:
> 
>>
>> "undefined method `text_field' for #<Payee:0x4472530>"
>>
> Could you just call fields_for and pass through the yielded object
> instead of passing through @payee ?
> 
> Fred

How would I pass through the yielded object?  I can't write "fields_for 
:payee" since this partial is used by the other two models (events, 
institutions) as well.

When trying the following . . .

<%= render :partial => 'shared/location', :object => @payee %>

<% fields_for :location  do |l| %>
  <%= l.text_field :address, :size => 60 %>
<% end %>

The rendered HTML is showing the field ids as such "location_address", 
when they need to ultimately be "payee_address"

I'm obviously missing something here.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to