El Wednesday 25 March 2009 15:36:51 Wes Gamble escribió:
> In this particular case, I have a model which "acts_as_mappable" - this
> plugin adds special geocoding-related options to AR::Base.find().  So I
> needed to filter my list based on a distance from a given point, and so
> I need to be able to pass these custom geocoding-related options.
>
> I am going to submit a pull request for the patch I wrote.  Simply a
> method called "custom_finder_options" that gets invoked in AS's
> "find_page" method.  Here's the implementation for my particular case:
>
>   def custom_finder_options
>     @location_specified ? {:within => @within.to_i, :origin =>
> [...@from_lat, @from_lng], :order => 'distance'} : {}
>   end
>
> Thanks for the help.
>
> Wes

Ok, it's a good point. I have used a similar plugin (or the same plugin), but 
not with active_scaffold. Send the pull request and I pull it.

>
>
> Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
>
> wrote:
> > El Monday 23 March 2009 16:19:36 Wes Gamble escribió:
> >> All,
> >>
> >> I've decided that I have a requirement to pass arbitrary AR::Base.find()
> >> options to the find that AS does in order to generate the "list" view.
> >
> > What you need pass which is not possible currently with
> > active_scaffold_conditions and active_scaffold_joins?
>
> 


-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

  • Mo... Wes Gamble
    • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
    • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
      • ... Wes Gamble
        • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.

Reply via email to