search for: street_address

Displaying 7 results from an estimated 7 matches for "street_address".

2008 Feb 25
1
NoMethodError: undefined method `<=>' for :zip:Symbol
...the book "Ruby on Rails: Up and Running". The example I am on had me add a table to the database that looks like so: CREATE TABLE people ( `id` int(11) NOT NULL auto_increment, `type` varchar(20) default NULL, `name` varchar(20) default NULL, `email` varchar(30) default NULL, `street_address` varchar(30) default NULL, `city` varchar(30) default NULL, `state` varchar(20) default NULL, `zip` int(5) default NULL, `camera` varchar(20) default NULL, PRIMARY KEY (`id`) ) In addition, I created the following two classes: class Person < ActiveRecord::Base composed_of :address...
2008 Nov 01
2
stuck on a validates_presence_of unless issue
i have a person object. Persons don''t need to have addresses, but if they have any address field value, they must have them all. So I have something like this: validates_presence_of :street_address, :city, :state, :postal_code unless :address_blank? address_blank? checks whether all of the address fields are blank. If I run a test like this, it works: describe "given attributes" do before(:each) do @valid_attributes = { :first_name => "Jonny",...
2007 Mar 26
2
Issue generating XML with hyphenated element names
...enerate and XML file using .rxml and I''m having a problem with element names that contain a hyphen. Here is a chunk of the .rxml file: xml.instruct! :xml, :version=>"1.0" xml.properties do @properties.each do |p| xml.property do xml.location do xml.street-address(p.street_address) xml.city-name(p.city) .. end end end end As soon as the code hits the street-address line, a NoMethodError is thrown: undefined method `address'' for #<#<Class:0x664ede8>:0x664edc0> Any idea how to fix this? The hyphens are dictated by the client, thus I can...
2012 Nov 29
2
[Rails 3.2] form_tag w :remote => true doesn't fire up the js format
...hplace" name="commit" type="submit" value="Search" /> </form> upon submit, params received in backoffice/places_controller#search {"utf8"=>"✓", "country"=>"United", "city"=>"*", "street_address"=>"*", "wording"=>"*", "commit"=>"Search", "action"=>"search", "controller"=>"backoffice/places", "locale"=>"en"} backoffice/places_controller.rb respond_to :htm...
2014 Feb 06
0
Array Confusion
...quot;=>"ROOFTOP", "viewport"=>{"northeast"=>{"lat"=>37.4233474802915, "lng"=>-122.0826054197085}, "southwest"=>{"lat"=>37.4206495197085, "lng"=>-122.0853033802915}}}, "types"=>["street_address"]}, @cache_hit=nil>] Outside of the conversion of string to integer errors (?), I can't traverse this array because it holds a comment in the first line there, before an instance variable is set to the data. Quite confused. Any insight appreciated. Cheers -- You received this mess...
2008 Jun 18
1
Vpim gem
On Wed, Jun 18, 2008 at 6:32 AM, Joost Hietbrink <joost at joopp.com> wrote: > Hi Sam Roberts, > First of all. Thanks for the Vpim gem. We use it at www.yelloyello.com and > it works great. I''m glad to hear that. > We''ve only encountered the following error: > # NoMethodError (undefined method `to_str'' for []:Array): > # >
2007 Nov 03
3
Birthdate validation
...y head trying to do this birthdate validation. It turns out that I can only accept users with at least 18 years old and I''m trying to validate it writing this code on my user.rb fil at app/ models class User < ActiveRecord::Base validates_presence_of :full_name validates_presence_of :street_address validates_presence_of :city validates_presence_of :state validates_presence_of :country validates_presence_of :zip_code validates_numericality_of :zip_code, :message => "must contain only numbers." validates_presence_of :phone validates_numericality_of :phone, :message => &qu...