similar to: ActionPack: number_to_phone error

Displaying 20 results from an estimated 400 matches similar to: "ActionPack: number_to_phone error"

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/.
2006 Jul 29
1
Problem starting push server in Jugganaut
Hi All, Im playing around with Jugganaut but stuck at the first step. Seems the jugganaut push server requires json (which I have installed) but it cant find it. Following the docs, I have installed json and then try to run the push server. jonathan $ ruby script/push_server script/push_server:37:in `require'': no such file to load -- json (LoadError) from
2006 Aug 13
1
select include_blank true
Is there any way to display a default message value ''Select'' rather tha an empty value when using this option ? kad -- Posted via http://www.ruby-forum.com/.
2006 Aug 14
1
Rails Live CD
Hi Many on this board may already be aware of this, so for those who are not Just ran across this, burned it and now playing with it. Rails Live CD - Based on PCLinuxOS http://www.pclinuxos.com/news.php I''m just starting out with ror. maybe other newbees might find this of some interest. Clark http://sgetty.ath.cx -- Posted via http://www.ruby-forum.com/.
2007 Feb 23
11
Problems getting mongrel service working
Hello list! I have mongrel service 0.1.0 working on my current production machine. Upgrading to a new server and also moving to mongrel service 0.3.1 has not worked yet. I am hoping someone will have an idea as to why. I have mongrel installed properly (I think): C:\rails\igacc>gem list --local *** LOCAL GEMS *** ... mongrel (1.0.1) A small fast HTTP library and server that runs
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 Aug 25
8
Tutorials
Getting a bit frustrated with the documentation of RoR I ask you if you can recommend a good tutorial that I''ve missed :-) The current problem that I''m stuck with is forms and list and how to display or not to display columns. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed
2007 Feb 20
2
service::start borken
Hello Mongrel Users! This is my first post! Is there an expected release date for the fixed version of mongrel_service that will resolve the missing service::start command? I would love to use the much improved features of the new mongrel_service, but I haven''t been able to yet. I haven''t figured out how to follow Zed''s advice on a previous thread to just use the
2007 Nov 29
3
Stylistic preferences
What are people''s opinions on which of these two styles is better to use? 1) before --------------------------- module UserSpecHelper include GenericSpecHelper def valid_sms_attributes(phone_number="12345") { :phone_number => phone_number } end end describe User, "with phone number" do include UserSpecHelper before(:each) do @user =
2006 Aug 22
0
Re: Best way to set up application settings?
http://wiki.rubyonrails.org/rails/pages/SettingsPlugin Very easy to use. Can be used to setup user specific settings, as well as applicatoin-wide settings. Since the settings are in the db you can change setting without restarting the app, as you would have to if they were in environment.rb. -- (********************************************************** * Peter H. Boling * Web Application
2006 May 24
1
does select support arrays in a form with multiple models?
i have a one-to-many model (an addressbook of contacts with many phone numbers). i want to represent a select element so that its name is an array containing the phone_number id... <select id="phone_number_1_location_or_kind" name="phone_number[1][location_or_kind]"> <option value="Work">Work</option> <option
2007 Jun 24
6
I only want one type of model returned from a multi_search
I am trying to use acts_as_ferret''s multi_search to search across multiple models, but i only want it to return one type of model. for example i have a page that lists out people. on this page it shows email addresses and phone numbers. I want to be able to search by any fields directly from the person model and search the fields from the email_address and phone_number models, but I only
2006 Oct 20
2
Rails & IIS
There are several sites I''ve found on the web detailing how to setup IIS with Rails. Unfortunately they all seem to be woefully out of date. I believe they may all even be pre Rails 1.0. Can single sign on via Active Directory Services be accomplished through mod_NTLM for Apache, so users won''t have ot log into the intranet site after already having logged into their machine?
2008 Nov 04
3
Nester Resources, Routes and Class Inheritance
Ok here''s a quicky... but a goody :) We have models Company, Reference and Applicant... and References and Applicants just inherit from Company, and are basically companies with the type field set to reference... All companies can have a phone number associated with them, and phone number is a different model... I''m having trouble using the form_for method with a company that
2006 Oct 20
7
MVC and modules. Views telling models to behave
I was thinking today, it would be nice if a view could tell a model how to format it''s data for that particular view. Kind of like, the view is bestowing instant, and temporary knowledge on the model for the duration of the views run. It seemed to me that this would be more objecty than say a helper that formats a string format_my_string( my_string ) Instead, in my view. Lets assume I
2008 Mar 19
2
Stub / Mock - A little guidance?
Hi there, I''m still trying to wrap my head around when to use a stub and a mock. If I understand this right, I should be using a ''mock'' when imitating an object, but not its behavior. I should be using a stub when I want to imitate the behavior of an object. Does that sound about right? With that said, I''m struggling a little trying to spec out this instance
2006 Dec 12
2
RXML partial question
All, I have a RXML template which renders partial RXML templates within it. A snippet is below. The "xml" variable is the parent template''s Builder variable. It is passed into the partial under the name "parent_xml". Why can''t I use :locals => {.... :xml => xml ....} in my call to render the partial? It seems like if I do use :xml => xml, it
2012 Sep 15
2
[RSpec Testing] Methods take two arguments
Hello, Here is my *pdf_helper.rb* => http://pastebin.com/QU1kTKXk. I want to test, if self.create method can take more than two arguments. But, when I try to run my test. It showed *PdfHelper Should have two arguments Failure/Error: create_pdf.should_receive(object,template).with(user,file) NameError: undefined local variable or method `create_pdf'' for
2006 Jun 24
3
Performance vs normalization best practice
I have a common situation and would like best practice suggestions from some of you more experienced rails developers. In my DB I''ve normalized tables in a traditional manner, e.g. I have Posts which have authors stored in a Users table. My problem is when I go to show a list of Posts and I want to display the author name (e.g. post.author.name) ActiveRecord appears to do a SELECT
2006 Jul 05
0
Javascript repeating fields.
The one area I keep hitting my head against in Rails is repeating fields via javascript. I frequently have forms where one or more fields are actually broken out into sub tables because there can be multiple simultaneous values. Rails seems to want to you to use the [] construct in the form helpers (e.g. text_field(''employee[]'', ''name'')), but I can''t