Thursday, December 16, 2010

[Rails] Re: Build associated model confusion

Thanks you guys!

Got things working, but having some problems with GeoKit and Rails3.
I'll have to do some more investigation on that front!

--
Melih O.
http://www.onvural.net/melih

On Dec 15, 7:19 am, Marnen Laibow-Koser <li...@ruby-forum.com> wrote:
> Simon Baumgartner wrote in post #968527:
>
> > A comment about your Location model:
>
> > You rarely need 'initialize' when creating new model instances (and in
> > this case you don't).
>
> Good catch!  But make that "never", not "rarely".  ActiveRecord
> constructors generally shouldn't be overridden.  Instead, use before_ or
> after_create callbacks to set values (as in your example).
>
> > The beauty of ActiveRecord is that it automagically gives you instance
> > variables for all table columns.
> > If you need any variables that are not a table column use
> > attr_accessor :foo_bar
>
> > Also, for all geocoding needs I would usehttp://geokit.rubyforge.org/
>
> Indeed.  Also investigate Spatial Adapter, and consider PostGIS if
> you're using PostgreSQL.  (If you're not using PostgreSQL, you probably
> should be. :) )
>
> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
>
> --
> Posted viahttp://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate