Hi there I have two arrays having different values of active records from same table but having different values, I want to combine them both and then sort them by created_at
, but not getting any clue, I am stuck.
Please help.
Here is my code:
@find_user = EmployeeLeave.where(global_user_id: @allarray[i]).find(:all)
@all << @find_user
@find_referal_user = EmployeeLeave.where(referral_id: @allarray[i]).find(:all)
@all_entry << @find_referal_user
@total = @all + @all_entry
any thing is not working please help me to sort the @total
.