pulling my hair out on this because I don''t understand...
I have 2 methods/actions in the same ''placements'' controller
that I am
concerned with...
find, works properly...
view code from find.rhtml
<td><p><label>Client</label><br/>
<%= text_field_with_auto_complete :placement, :clwholename, {} %>
</p>
</td>
new, which throws me an error...
undefined method `clwholename'' for #<Placement:0xb78e0dc0>
which has the same exact view code as above...
clwholename is an aggregation defined in the Client class which combines
the client first_name, middle_initial, last_name
the controller code for new and find don''t seem to impact this...
def find
@placements = Placement.find(:all)
@clients = Client.find(:all)
end
def new
@placement = Placement.new
@client = Client.find(:all)
end
but just to make sure, I added the 2 lines in the ''find''
definition,
into the ''new'' definition and the result is the same.
and I do have the method in my controller that should works for
''find''
but not ''new''...
def auto_complete_for_placement_clwholename
auto_complete_responder_for_clients params[:placement][:clwholename]
end
Why would ''find'' work but not ''new'' ?
Craig