similar to: undefined method `scope' for non ActiveRecord class

Displaying 20 results from an estimated 2000 matches similar to: "undefined method `scope' for non ActiveRecord class"

2009 Oct 22
6
Mapstraction V2 Geocoder?
Hey all, I''m wondering about your thoughts on upgrading the Geocoder to use Mapstraction V2. Currently it uses the old syntax (i.e., for LatLonPoint, etc.): http://mapstraction.appspot.com/#geocoding Moving from V1 to V2 is fairly simple changes to the code. However, I wonder whether we want to update the way the geocoder is structured, as well? Some options: 1) Roll geocoding
2006 Feb 01
3
Parsing RDF coming from a URL
Hello, i''m writing an application that needs geocoding information for locations outside of the US. I''m using the brainoff.com geocoding service mappoint = Net::HTTP.new(''brainoff.com'', 80) response = mappoint.get(''/geocoder/rest/?city=Gent,BE'') logger.debug response.body and the body of the response is in the following form : <rdf:RDF
2009 Jul 30
2
CRAN + geography = Cranography
In response to an earlier discussion about finding the fastest/best/nearest CRAN site, I geocoded (using my geonames package) the locations of the CRAN sites returned by getCRANmirrors. I've mapped them here: http://www.maths.lancs.ac.uk/~rowlings/R/Cranography/ The geocoding may have got it wrong, so if CRAN site maintainers want to send me a real lat-long (in WGS 84 aka EPSG:4326) I'll
2010 May 21
0
r83 committed - Making the geocoder pass JSLint
Revision: 83 Author: dezfowler Date: Fri May 21 11:57:43 2010 Log: Making the geocoder pass JSLint http://code.google.com/p/mapstraction/source/detail?r=83 Modified: /trunk/source/mxn.google.geocoder.js ======================================= --- /trunk/source/mxn.google.geocoder.js Wed May 19 16:33:35 2010 +++ /trunk/source/mxn.google.geocoder.js Fri May 21 11:57:43 2010 @@ -28,7 +28,7 @@
2006 Sep 01
1
Reverse Geocoding?
Howdy folks, I know a lot of people (Google, Yahoo, others) offer geocoding, I am looking for a Web service for reverse geocoding. For instance, I have a latitude and longitude and I would like to get an approximate street address for them. I haven''t found anything that''s working all that well for me so I thought I would ask here. Any ideas? Thanks, H
2012 Apr 13
0
Scoped attr_accessible not working?
Please refer to the ActiveModel MassAssignmentSecurity api<http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html>for this. I''m on Rails3.2.3/Ruby1.9.3 and trying to use that technique in the controller as described. It is supposed to dynamically restrict the attributes that can be mass assigned. However, sanitize_for_mass_assignment is ignoring
2011 Feb 09
0
Weird error after upgrading to rails 3.0.4
Hey folks, have you seen this ever? [user@i ~/rails_project]$ rake rails:update --trace (in /usr/home/rails_project) rake aborted! uninitialized constant ActiveModel::Validations::HelperMethods /usr/local/lib/ruby/gems/1.8/gems/activemodel-3.0.4/lib/active_model/ validations.rb:50 /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.4/lib/ active_support/concern.rb:52:in `class_eval''
2010 May 20
0
best practices for calling a web service (like geocode)
Guys, I have a Customer class which creates an instance of an Address class, and the user can then go into the show method of the Customer class and associate other addresses with that Customer (sites). As soon as an Address instance is created, I want to call geocoding to get the latitude and longitude of that address so that I can later render a map of all the sites. now, I suspect that a
2010 Nov 09
3
help getting started with javascript generated forms
How does one generate a form within a view using javascript? Specifically, assume views/premise/new.html.erb looks like this: <%= form_for(Premise.new) do |f| %> <%= f.hidden_field :full_address, :value => $FULL_ADDRESS %> <%= f.hidden_field :geocoding, :value => $GEOCODING %> <%= f.submit :value => "use this address" %> <%= f.label
2019 May 15
2
Identificar por coordenadas geográficas una calle de una ciudad
Estimados Sobre como obtener la geolocalización, aparte de lo aportado por Rubén Casal, también existe el api de Microsoft, lo que yo descartaría es tomar una base de datos con geolocalización, teóricamente andarían pero si uno por casualidad conoce la geografía real, se da cuenta de errores, salvo que en España los datos estén correctos. Javier Rubén Marcuzzi El mié., 15 may. 2019 a las 8:50,
2012 Feb 16
0
Upgrading from 3.2.0 to 3.2.1: Wrong Number of Arguments
Simple spec passes in 3.2.0: it "destroys an album" do 3.times { Factory(:album, photo_library: @photo_library) } visit photo_library_path(@photo_library) find("h3").click_link ''Delete'' find("#notice").should have_content("Album deleted successfully") Album.count.should eq 2 end But fails in 3.2.1 with: 1) Albums destroys an
2010 Aug 13
2
Rails 3 / ActiveModel for Credit Card information?
When submitting billing information in the past I''ve always used attr_accessor for credit card details as they should not be saved in the database. In addition I always end up storing the card expiration date so that the date form helper works correctly. With Active Model it seems logical to create a CreditCard class to hold this data instead. **1st issue.** It seems there still
2012 Aug 05
0
ActiveRecord::Validator vs ActiveModel::Validator
I know that there is an ActiveModel Validator class https://github.com/rails/rails/blob/master/activemodel/lib/active_model/validator.rb which is used for the class level validation macros. But I didn''t find a an ActiveRecord Validator class. From my understanding in Rails 3, validations have been moved into ActiveModel to leave ActiveRecord as an ORM. So now I see this Rails 3 code
2009 Feb 23
2
geokit - using :through to connect models
hello.. i am currently trying to use :through 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
2008 Jun 16
1
Fix for IE6 bug in geocoding
Hi, I was trying to use the geocoding stuff in Mapstraction and found a bug with IE6. I couldn''t find a way of submitting it on Trac, so here it is. Change line 110 of mapstraction-geocode.js from: place = response.Placemark[0]; to: var place = response.Placemark[0]; Otherwise IE6 doesn''t declare the variable properly and things break in obscure ways. Cheers, Tom
2010 Dec 16
0
MassAssignmentSecurity for multiple contexts
I need to add some mass assignment protection (ala ActiveModel::MassAssignmentSecurity) but I can''t find how to do it contextually. For example, in one controller action I want to to whitelist attributes x, y and z and in another I want to whitelist attribs y and z. How can I do that? The attr_accessible function has a class-wide scope, whether in a model or in a controller. But I would
2014 Feb 22
0
Validates inclusion of include fails at plugin.
Hello, MyModel.rb, TYPES = { "type1" => 1 , "type2" => 2, "type3" => 3 }.freeze validates_inclusion_of :my_type, :in => TYPES.keys --------------------------------------- MyModelPatch.rb, base.send(:remove_const, :TYPES) base._validators[:my_type].reject!{ |validator| validator if validator.is_a? ActiveModel::Validations::InclusionValidator } TYPES =
2007 Jul 24
3
geocoding addresses with ym4r google maps
Does anyone know how to geocode addresses using the YM4R Google Map plug-in? -- Posted via http://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe
2014 Feb 06
0
Array Confusion
I have the following instruction that returns an array that I'm quite confused about. I can't even read it. Can someone shed some light as to how to reach into this array of hashes (that's what I can see) to get the location lat and lon? res = Geocoder.search(addy1) This is the res: [#<Geocoder::Result::Google:0x007fb46c345e18
2011 Jun 10
0
pull request for reverse geocoder
Hi everyone, I''ve made a pull request on github since april for reverse geocoder implementation : https://github.com/mapstraction/mxn/pull/61 I need this functionnality to complete my work on GIS module for SPIP : http://zone.spip.org/trac/spip-zone/browser/_plugins_/gis/trunk Just let me know if we can put this functionnality in mxn or if i had to make it aside and keep it away of