Displaying 5 results from an estimated 5 matches for "number_to_phon".
Did you mean:
number_to_phone
2006 Aug 14
2
ActionPack: number_to_phone error
Question about the number_to_phone function as provided by rails in actionpack:
http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html
If I do this in my controller:
num = number_to_phone(params[:phone_number])
I get this error:
undefined method `number_to_phone'' for #<TicketsController:0xb...
2007 Feb 23
2
how to remove spaces from phone number
Hi,
I need to allow login based on the phone number. During the signup they
can give the number in any format with spaces, slash or (). But for
storing in database and then during login to compare I just want the 10
digit number. How can I remove the special char from phone number before
storing to db ?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Jan 30
4
multiparameter assignment
I''m trying to figure out the rails why to break a single database field
out into multiple fields on a form, very similar to how rails does with
dates. How can I create my own object that mirrors the date objects
behaviur in how it accepts the multiparameter assignment from the form.
Example:
A phone number field (to force formating on the user) could be broken
into 3 form fields,
2006 Dec 12
2
RXML partial question
...s_first
========== snippet of RXML partial ================
columns.each do |col_array|
attr_name = col_array[0]
column_display_name = col_array[1]
value = eval("obj.#{attr_name}")
column_contents = (column_display_name == ''Fax Number'' ?
number_to_phone(value, {:area_code => true}) :
value)
parent_xml.td(column_contents, :id => "#{obj.id}_#{attr_name}")
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribe...
2006 May 09
11
model filter?
Hi All,
Is there a way to filter / modify the output of a model class before
it''s returned to controller/view that''s calling it?
Example: I have a field phone_number which I always want to preformat
using the number_to_phone() helper....
Any help is appriciated.
Thanks!
--
Posted via http://www.ruby-forum.com/.