search for: destiny_d

Displaying 1 result from an estimated 1 matches for "destiny_d".

Did you mean: destined
2008 Sep 25
0
Join different querys in the same object
Hi, I''m new in Ruby on Rails and I don''t know how can I achive something like this: @switchs = Switch.find(:all) for switch in @switchs if current_user.shifts.count(:all,:conditions=>["date = ? and shift = ?",switch.destiny_date, switch.destiny_turn]) !=0 @valid = switch @valid.merge(cambio) end end return @valid Let me explain. I just want to put in the same @valid object, switchs that satisfy the "if" condition. So, I have to loop for every switch and just select those ones tha...