search for: acts_as_mappable

Displaying 5 results from an estimated 5 matches for "acts_as_mappable".

Did you mean: acts_as_gmappable
2009 Feb 23
2
geokit - using :through to connect models
...h to attach two of my models together using geokit. for some reason, i am running into a problem: ArgumentError: Unknown key(s): as i have two models, one that is geocoded, and one that belongs to that model. the models look like: ,----[ employer.rb ] | class Employer < ActiveRecord::Base | acts_as_mappable | before_validation_on_create :geocode_address | | has_many :internships | belongs_to :account | belongs_to :role | | private | def geocode_address | geo=GeoKit::Geocoders::MultiGeocoder.geocode(address1 + " " + city + " " + state + " " + zip) | er...
2011 May 31
1
Geokit query with multiple models involved
Hello, My database structure consists of Store, Book, BookStore and Address as below. class Store < ActiveRecord::Base has_many :book_stores has_many :books, :through => :book_stores has_many :addresses acts_as_mappable :through => :addresses end class Address < ActiveRecord::Base belongs_to :store acts_as_mappable end class Book < ActiveRecord::Base has_many :book_stores has_many :stores, :through => :book_stores end # Join table for many to many relationship between books and stores class...
2008 Jul 06
1
GeoKit / Form Validation
...pt when there are validation issues on the address piece it just returns saying "Addresses is invalid". I would much rather it say "Street Address is blank" or "City cannot be blank" any ideas on how to do this? 2) In using the GeoKit plugin I am attempting to use the acts_as_mappable piece so when I create an address it adds the lat and lng to the DB. If I choose just 1 field and specify it this works fine and the table populates, but I want to concat all of the form values (Street_Address_1, City, State, Postal_Code, Country) and pass these in as the location. It appears GeoKi...
2007 Dec 22
8
Rails 2.0 rescue_from
I am trying to use the new Rails 2.0 macro : rescue_from class PostsController < ApplicationController rescue_from ActiveRecord::RecordNotFound, :with => :deny_access ... def show @post = Post.find_by_id(params[:id]) raise ActiveRecord::RecordNotFound if @post.nil? #illegal access ..... end def deny_access respond_to do |format| format.html end end but the
2008 Feb 07
1
geokit on merb
I converted the rails geokit plugin to a merb plugin today. Anyone interested in testing it out? It seems to be working great for me. If so, where should I put it? I don''t have a blog up or anything right now. Been meaning to do that, but haven''t had the time. -Dusty Doris