search for: postcod

Displaying 20 results from an estimated 99 matches for "postcod".

Did you mean: postcode
2006 May 18
3
Google Map
Used a great howto @ http://iamrice.org/articles/2005/12/09/using-google-maps-in-the-uk-with-rails for using google maps on uk sites. Just having one issue I can''t seem to work out how to draw the postcode from my table I keep getting hit by method errors. The controller is require ''postcode_2_latlong'' postcode = Postcode.new("TN22 2LG") # I want this to be a postcode from my database not TN22... latlong = postcode.to_latlong Then postcode.rb in /lib reads... require...
2005 Aug 10
5
validates_format_of on an optional field using :if
Hi there, I''ve got the following in my model: validates_format_of :postcode, :with => /^([a-zA-Z]{1,2}[0-9]{1,2} [0-9]{1}[a-zA-Z]{2})$/, :message => "is not valid", :if => :postcode ... but it''s not working - it always insists on validation, even if postcode is empty. Basically, the postcode field is optional, but if it''s filled in,...
2006 Feb 28
1
Wrong id after join!
The Problem ----------- After using a join in my find the id attributes set in my Entity objects are wrong! It is setting the Entity id to the value from Postcode id! The Code -------- entities = Entity.find(:all, :conditions => [...omited...], :joins => "as e inner join postcodes as pc on substring_index(e.postcode,'' '', 1) = pc.outer_part " ) Produces the folowing SQL ---------------------...
2008 Sep 22
1
Ccreating methods on the fly / counting distinct field values
Hi, I''m pretty new to ruby and rails, so apologies if this has been covered before (I couldn''t find a thread on it). I want to retrieve a count of records held in the DB for every distinct value of an attribute. E.g. given a class Address with a postcode field, I would like to retrieve an array of ValueCount objects. The ValueCount object would hold the value retrieved from the db and the number of records which hold it. I''ve written a class specific method which does this: selects all occurrences of an object with ActiveRecord.find(:a...
2006 Jan 31
11
ez_where plugin updated features.
Friends- I wanted to let people know that there is a new experimental release of this plugin. I would love feedback on syntax and features. There is now a full test suite with fixtures that covers all the available syntax. Look at the test suite for more syntax possibilities. There have been many additions since my last release. Fabien Atelier has been working on this with me and has
2016 Apr 29
1
How to access the latitude & longitude for UK post codes in R
Hi All, I have a data frame with three columns i.e., pc, lat, lon. The pc column is populated with list of postcodes, and I want to execute R command that can get me the lat and lon for the every item in the pc column and populate the respective lat and lon columns. Is there any package that could be used? Any help will be really appreciated. Many Thanks and Kind Regards -- Muhammad Bilal Research Fell...
2006 May 03
10
get Addresses and house numbers from Post Code?
Hi, does anyone know a way to get the address and a list of house numbers from a Post Code? Is their an online web service that will do this? I''m creating an app for a chinese take-away and this functionality is important. What do you think is the best way of achieving this? for UK post codes. Thanks Chris -- Posted via http://www.ruby-forum.com/.
2008 Sep 06
0
Tab control using FXRuby
...s, in a scrolling window, followed by a row of function buttons. Problems: 1) For data entry purposes I''d like the function buttons NOT to be entered by pressing Tab keys, and retain their ''clickability'', but when the user Tab''s out of the last scrolling field (postcode) to have the form scroll to the top and the cursor positioned in the first field to accept a new set of data. The scrolling works, but the focus moves to the first Button and not the field even tho I have a explicit setFocus. I dont want the Buttons ''hidden'' just not tabbable --...
2006 May 02
4
useful bit of code (hopefully)
...veRecord, perhaps it''s useful for others, or others can improve on it: ########### # fix user input before validating it before_validation :sanitize_input # santize input before actual validation is called # this uses the little methods defined below def sanitize_input trim %w(adres postcode woonplaats email naam telefoon mobiel) downcase :email empty_to_nil %w(telefoon mobiel) end # pass in a list of fields whose values will be converted to nil # you should only use these on objects that respond to empty? # if the value is empty (this causes empty strings '''...
2008 Jun 18
1
Question
Hi list, I am trying to convert my Data from 1st following format to the second. Any comment? You could copy following in Tinn R Data<- data.frame(location=c("postcode","sector","long/lat","sector"),Grade=c(" h","m","L","h"),value=c(2,3,5,6)) #Question: how can I reshape Data to the following # Grade postcode sector long/lat # h 2 6 0 # m...
2006 Aug 31
1
Peculiar validation error: undefined local variable or method 'fieldWithErrors'
Hello all, I''m submitting a form with the following field - <%= p.text_field :postcode, {:class => ''inputMedium''} %> and on submitting the form I am getting this error - NameError in Property#create Showing app/views/property/sell.rhtml where line #52 raised: undefined local variable or method `fieldWithErrors'' for #<Object: 0x1de968> E...
2006 May 30
6
Reuse Partials
Hi all, This is my first official post as RoR developer, so here it is. I''ve got a partial for a Address (Postcode, Address, City, ...). I want to use this partial multiple times on the same form? So I want to fill in multiple addresses and insert them individualy. How do I go about doing this? Kind Regards, Eugene Louw -- Posted via http://www.ruby-forum.com/.
2008 Mar 05
3
regex sulotion for seperating number and string
I have strings contain postcode and letters, some seperated with blank, some with comma, and some hasn't seperated. eg, "2324gz" "2567 HK" "3741,BF" I want to seperate the number and letters into two new variables. I know this should be quite basic question, but searched on regex syntax and...
2006 Apr 19
9
geolocation db?
I''m currently planning a social app in Rails that relies on being able to see how far you are from everyone else. It''s my intention to store rough geo-coordinates as part of the sign up process. My intention is to capture their zipcode or postal code, and then be able to query a webservice once for that data. It''s also possible that there might be a database or even
2006 May 23
0
where to initialize a variable in an AJAX based application
...e as clear as possible. I am a bit confused on best practice for instanciate a variable that will be used accross several methods within the same controller. I need this because of AJAX, here is a description of what I intend to do: (all this in done using AJAX in a single page) 1. User enter postcode -> calls method 1 2. Method 1 queries a web service (initialization of the wsdl = overhead) -> returns a list of addresses for that postcode to the user 3. User select address -> calls method 2 (same controller as method 1) 4. Method 2 queries the web service a again to get the detail...
2008 Mar 07
0
Time series panel
I have a set of data that consists of a number of biological measurements. The columns are Time that runs from 01/01/2005 to 01/5/2007, Group which has 23 levels and postcode which is nested within group. This is a balanced panel but the number of postcodes differs within groups, from 15 to 400. The rest of this data consists of a number of columns of quantitative measures, largely counts. I would like to set this up as a dataframe but retain the time series elem...
2007 Jul 26
3
Spec for validation plugin
Hi, I''m writing a specification for a model called Location which has a post_code attribute which should be a valid UK postcode. I''m using the http://svn.designbyfront.com/rails/plugins/validates_as_uk_postcode/ validates_as_uk_postcode plugin to handle the validation but I''m not sure how I should properly specify my model. Heres the model code: class Location < ActiveRecord::Base validates_as_...
2012 Jan 06
2
Zipcode validation
Hi All, How to validate Zip/Postal code enterd is valid based on country selected? Is there any plugin for checking zipcode format for different countries.. Thanks -- 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
2007 Sep 13
2
handle dates in R?
...:::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/:::: ::::::::::::: [***********************************************************************] Zhi Jie,Zhang ,PHD Tel:86-21-54237149 Dept. of Epidemiology,School of Public Health,Fudan University Address:No. 138 Yi Xue Yuan Road,Shanghai,China Postcode:200032 Email:epistat@gmail.com Website: www.statABC.com [***********************************************************************] oooO::::::::: (..)::::::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/:::: ::::::::::::: [[alternative HTML version deleted]]
2006 Nov 28
2
Twice the same code, but only once it seems to work
...gt; <%= text_field ''company'', ''adline'' %></p> <p><label for="company_adline2">Adline2</label> <%= text_field ''company'', ''adline2'' %></p> <p><label for="company_postcode">Postcode</label> <%= text_field ''company'', ''postcode'' %></p> <p><label for="company_city">City</label> <%= text_field ''company'', ''city'' %></p> <p><l...