Hey Everyone, I think this should be an easy one, and the solution
right now was to use two lines instead of one, but I am curious why
this syntax isn't working.

Assignment.find(:all).delete_if {|assignment|
assignment.assignment_name == "Lunch" || assignment.assignment_name ==
"Lunch"}

This will return the array without the "Lunch", but with the break
still in tact, so I tried again:

Assignment.find(:all).delete_if {|assignment|
assignment.assignment_name == ("Lunch" || "Break")}

Nope! No good, once again, lunch is gone, but break is still in the
array.

tried to do the same thing with select as well . . . no dice. I have
this working right now with two lines of code, but I am really curious
where my syntax is going wrong. More a question of interest then
anything else.

Thanks!

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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