I have a problem of gut-wrenching proportions that can easily be
illustrated by the following snippit of template code:

<% member=Member.find(params['id']) %>
<p>ID: <%= member.id %></p>
 <% outfile=File.open('/tmp/look1','w')
    outfile.puts(member.id)
    outfile.close %>

The correct id is properly displayed within the paragraph element.
However, the id that is sent to the disk file is incorrect in that,
for some unknown reason, it is the id of the very first record in the
database.  If I replace '.id' with '.inspect' in the 3ed to the last
line, the disk file confirms that it is actually accessing the first
record in the DB.  I can't figure out why that is.  It's like a bad
dream from which I expect to awake any moment.  I do hope that it
hasn't been a long day and that I'm doing something really stupid.

Thanks for any input.

         ... doug



--~--~---------~--~----~------------~-------~--~----~
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 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to