I have an array that is returned from a model that does not correspond to the view/controller. (i.e Data is from Foo, while I'm in '/bar/'). Therefore I cannot access them via the conventional
params[:someItem] So I am trying to extract values like this
someVariable = @array[0] However I get a scrambled mess:
#<Promotion:0x3b74140> Seeing as that the value I want is an int, I tried calling .to_i, which threw a No Such Method error. Calling to_int gave the same result.
Question: How do I get this value out of the array? And as an aside, why do .to_i and .to_int not work??