class Scope
include Mongoid::Document
include Geocoder::Model::Mongoid
validates_presence_of :name, :address
after_validation :geocode, :if => :address_changed?
geocoded_by :address
acts_as_gmappable :position => :coordinates
field :name
field :address
field :coordinates, type: Array
end
This is in my controller:
def show
@scope = Scope.find(params[:id])
@json = @scope.to_gmaps4rails
respond_to do |format|
format.html # show.html.erb
format.json { render json: @scope }
end
end
This is my model:
This is in my controller:
This is in my view:
The contents of the @json are:
Looking at the HTML source, I just see:
Any ideas?