Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def notifications
- new_array = []
- new_array << friends_for_me.collect(&:id)
- new_array << friends_by_me.collect(&:id)
- logger.info puts new_array
- #The Logger outputs
- #99
- #95
- #96
- #98
- #99
- #95
- #96
- #98
- friends = new_array.compact.join(' OR ')
- logger.info puts friends
- #outputs
- #99 OR 95 OR 96 OR 98
- #99 OR 95 OR 96 OR 98
- Notification.find(:all, :conditions => { :source_user_id => friends }, :limit => 10 )
- end
Add Comment
Please, Sign In to add comment