ok...
I got the solution by myself
now i am using the code...
@companies.each do |company|
places [ {:address => company.addr, :description =>
company.cname , :image => company.img}]
end
it is working without ant error...
but now the problem is that .
the values are getting overwritted
Thanks for the help...
actually i am using places hash evrywhereso i dnt want
modifications throughout the code...n files...so..i want to put the
all retrieved records to be placed in that...places.
n i want it at the start of controller call...
thats y...
ok i tried ur statments given...b
Vrishali wrote:
> N now using the statement
> @companies = Company.find(:all)
>
>
> But now i dont understand how can i store these fetched values in hash-
>> 'places'
>
> I dont want static values...
I'm not quite sure why you need to store the values from the
ActiveRecords in a hash, bu
3 matches
Mail list logo