Re: [Rails] Re: controller code and uninitialized constants

2010-02-06 Thread Craig White
On Sat, 2010-02-06 at 07:16 -0800, Luke Cowell wrote: > I don't think you're going to like this. I think the issue is that in > the for loop you need to capitalize the m in Gmarker (as in your > original code). > > Also, ruby offers something called each with index. Your code could > become someth

[Rails] Re: controller code and uninitialized constants

2010-02-06 Thread Luke Cowell
I don't think you're going to like this. I think the issue is that in the for loop you need to capitalize the m in Gmarker (as in your original code). Also, ruby offers something called each with index. Your code could become something like @salons.each_with_index |salon, map_id| map_id_ =

Re: [Rails] Re: controller code and uninitialized constants

2010-02-05 Thread Craig White
On Fri, 2010-02-05 at 10:17 -0800, pharrington wrote: > On Feb 5, 11:19 am, Craig White wrote: > > YM4R_GM plugin... > > > > This controller code works but clearly has limitations... > > > >map_1 = GMarker.new([...@salons[0].lat, @salons[0].lng]) > >@map.overlay_init(map_1) > > > > but I r

[Rails] Re: controller code and uninitialized constants

2010-02-05 Thread pharrington
On Feb 5, 11:19 am, Craig White wrote: > YM4R_GM plugin... > > This controller code works but clearly has limitations... > >    map_1 = GMarker.new([...@salons[0].lat, @salons[0].lng]) >   �...@map.overlay_init(map_1) > > but I really need this in a loop... > >     for salon in @salons do >