Hi,

I would like find how to do that :

def self.condition_for_near_column(column, value, like_pattern)

   if value!=""

        distance = value

        if params[:search][:zippostal]!=""

         center_point = Geocoder.coordinates(params[:search][:zippostal
].to_s+", FRANCE")


        else

          center_point = Geocoder.coordinates("75000, FRANCE")


        end


        box = Geocoder::Calculations.bounding_box(center_point, distance)

        

        ["latitude BETWEEN "+box[0].to_s+" AND "+box[2].to_s+" AND 
longitude BETWEEN "+box[1].to_s+" AND "+box[3].to_s]

      end

end



but I have :


NameError (undefined local variable or method `params' for 
Filemaker::PersController:Class):

  

app/controllers/test.rb:1094:in `condition_for_near_column'




Do you know how I can do that ?


Thank again for your help


Gloufy

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to