Displaying 2 results from an estimated 2 matches for "current_entri".
Did you mean:
current_entry
2012 Nov 12
3
Updating objects in arrays
...I simply am missing something about updating members of an array.
I have an array of 10 ActiveRecord objects. I wish to iterate over the
array and update an attribute. When I do this the underlying table row
changes but the object in the array frequently does not. For example:
count = 0
current_entries.each do |entry|
puts( entry.object_id )
puts( current_entries[count].object_id )
puts( "***" )
puts( entry.lock_version )
entry = set_customs_entry_status_for( entry, status )
puts( entry.lock_version )
current_entries[ count ] = entry
puts( current_entri...
2006 Apr 21
2
Forms Containing Collections problem
Can anyone tell me why I''m getting the error "The error occured while
evaluating nil.id_before_type_cast" for the following view code
<% for entry in participant_portfolio.portfolio_entries -%>
<%= select "entry[]" , :id, @buyer_profiles,
:selected => entry.buyer_profile_id %>
<% end -%>
This seems to only happen when I use