Scenario:
I’m fetching few rows from one table to a variable. Then I want to
append that variable with another row of the same table, based on a
condition.
For that, I used push function with that variable, thinking the return
type of Finder is array or hash. But, it gives me Undefined Method
error.
This is for the functionality of drag & drop with two list. It would be
very helpful, if you can give me a simple and complete example of the
same as well.
push is almost certainly not what you want as it adds the argument at
the end of the array (even if the argument is an array)
for example:
[1,2].push [3,4] #=> [1, 2, [3, 4]]
whereas i expect you want to get [1,2,3,4]
push is almost certainly not what you want as it adds the argument at
the end of the array (even if the argument is an array)
for example:
[1,2].push [3,4] #=> [1, 2, [3, 4]]
whereas i expect you want to get [1,2,3,4]
Fred
Dear Fred, You are there… right. Thanks for the information.
Could anybody please help me append the data, explained above?