similar to: syntax for number_with_precision

Displaying 20 results from an estimated 500 matches similar to: "syntax for number_with_precision"

2006 Feb 21
4
displaying double digits
Hi, I have a question about displaying digits in Rails. whenever I print the price of an item, if the last digit is a zero or double zeros then it doesn''t display properly. How do I display a number so that it looks like currency? thank you! -- Posted via http://www.ruby-forum.com/.
2006 Aug 07
1
Escape ''&'' in text_field_with_auto_complete
Good day. I have searched on the net and through the archives to now avail as of yet. I have a text_field_with_auto_complete that searches for company names. These company names obviously can have an ''&'' in the name of the company (example Barnes & Nobel). The auto complete works beautifully. However, the problem arises when I pass the name of the company to the
2003 Apr 24
1
R 1.7.0 (Windows) Crashes After using "Install Package from Cran option" within
R-Community, (System Details at end) I recently downloaded R 1.7.0 win95 binaries from http://cran.us.r-project.org . After installing the program with no hitch I used the the 'Install Packages from Cran' optinon in the drop down menu from Rgui. (This may be bad form, if so let me know): I selected all paackages to install and everything was fine until the 'dse' package was
2009 Nov 06
0
Nested objects not propagating from view
I thought I had this fixed, but apparently not. It works okay from the console, but not from the view. I have the following: # partial schema create_table "users", :force => true do |t| t.string "login", :null => false t.string "first_name" t.string "last_name" t.string "email", :null => false
2008 Jul 01
2
rateable plugin problem
I am having some problem figuring out how to use the rateable plugin. i followed as close as the directions located at http://www.naffis.com/blog/articles/2006/08/31/rails-ajax-star-rating-system but there seem to be some problem. I am getting the following error You have a nil object when you didn''t expect it! The error occured while evaluating nil.rating Extracted source (around line
2013 May 02
1
trouble-with-capybara-and-rspec-on-a-new-model-spec
I have searched a lot for a solution, but I could not find it! I am trying to make a rails application after watching Michael Hartl''s tutorial and when i fill data manually and submit it nothing happens and nothing records in the Mailers table and I am facing the following error: Failures: 1) Mailer pages mail us with valid information should send a mail Failure/Error: expect
2006 Feb 23
6
irb with rails
I was trying to access rails functions (number_with_precision) from an irb session. It can''t find the method. How do I load the libraries ? TIA LS -- Posted via http://www.ruby-forum.com/.
2008 Dec 06
0
Problem in number_helper.rb ?
Hello, Today I noticed that the number_to_currency helper didn''t work anymore (it just returned the numeric value, without any currency). I tracked down the error and saw that editing line 89 ( number_to_currency method) as follows solved the problem : Old piece of code : begin format.gsub(/%n/, number_with_precision(number, :precision => precision, :delimiter =>
2006 Mar 01
15
Is there a perl equivalent of .= in ruby/rails??
I want to make a for loop that concats strings onto a variable: html .= var1 + "this is a test" + whatever What is the syntax that does this in ruby/rails? Also, is there a ''print'' method in ruby? Because when I try to use render_text it will only let me use this once. -- Posted via http://www.ruby-forum.com/.
2006 Dec 28
13
Sorting/Ordering Search Results
Hello All, I am having an issue with AAF and sorting results of a search. Right now, I have results being split onto pages of 10. The results are being sorted alphabetically, but not across multiple pages - it''s just sorting the 10 it pulls down on each page. I noticed another post from April regarding this same issue (http://www.ruby-forum.com/topic/62993#66934) where the issue was
2006 Jun 23
0
Re:(RESOLVED, KIND OF) auto complete and after update element
Well, I did finally get the after_update_element to call my controller action with the following syntax: <%= text_field_with_auto_complete ( :customer, :company_name, { :size => "45" }, :after_update_element => "function(element,value){" + remote_function( :url => { :action => :get_customer_info }, :with =>
2006 Feb 24
2
Formatting values of numbers using text_field
Anyone have a quick solution on how to format a number in a text_field tag? <% text_field "price", "amount" %> returns 100.0 and it would be nice if it showed 100.00 Of course, number_with_precision works nicely, but how do you make that work with text_field? I thought maybe overriding the getter in the model. However, this means I would have to bring the helper
2005 Sep 26
1
[Fwd: [Rails] Re: Autocomplete - setting a second value?]
Yeah, right... I posted this to the Rails mailing list. Sorry for people who see duplicate posts. -------- Original Message -------- Subject: [Rails] Re: [Rails-spinoffs] Autocomplete - setting a second value? Date: Mon, 26 Sep 2005 10:05:24 -0400 From: Fran?ois Beausoleil <fbeausoleil@ftml.net> Reply-To: rails@lists.rubyonrails.org To: rails@lists.rubyonrails.org References:
2006 Feb 21
4
customizing layouts for functions
I want to be able to have different layouts in my rails program for different functions. For example, when a person first comes to the site the layout will have a link that says ''home'', ''login'', or register on the menu bar. Once the user logs in however, the layout will change. I want it to show the links ''account manager'',
2006 Sep 23
8
acts_as_rateable plugin help!
Hello, I am having some trouble figuring out how to use the rateable plugin. i followed as close as the directions located at http://www.naffis.com/blog/articles/2006/08/31/rails-ajax-star-rating-system but i fail at working it. i am getting this error You have a nil object when you didn''t expect it! The error occured while evaluating nil.rating Extracted source (around line #1): 1:
2007 Dec 06
3
number_to_currency
I am using the number to currency function because i live in the uk and the company want me to only show values of the pound of course.I have created all my application using ruby script/generate scaffold_resource.... I have come across with a problem... this code is in my applcation: def number_to_currency(number, options = {}) options = options.stringify_keys precision, unit, separator,
2006 Mar 31
3
Need to use a method without the layout
I need to use a method (called by one of my controllers) without using the layout. All the other methods in the controller need to use this layout except for thismethod (becausae it''s called by an Ajax script). I know how to use :layout=>layout_name when calling a method from another method, but nothing is calling this. The layout needs to be removed in the method itself or I need
2007 Jun 04
1
acts_as_rateable in Beast
I''m trying to implement acts_as_rateable to my Beast installation to give users the option to rate posts (like reddit). I chose acts_as_rateable as it supposedly easily allows reddit-type voting but I''m having some problems setting it up and the documentation seems outdated. (http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/) So far, I''ve
2004 Feb 19
1
reshape direction=wide
Hello I am reshaping a data.frame bids --> reshaped as shown below. I thought this should be possible with a single invocation of reshape, but the only way I came up with is reshaping subsets for each keyword and then joining them together. Does anyone have an idea how to solve this in a more elegant way? Efficiency is a concern as the datasets are very large. Is there a way to specify
2006 Mar 02
4
Getting Acts_as_Paranoid to work with validates_uniqueness_of
Hello I''ve been using Acts_as_Parnoid for a while and it has been working well but I am now having a slight issue with it. I have a company table were I would like to use validates_uniqueness_of :company_name. This validation works if a company exists in the database and has not been deleted. However, I also would like the validates_uniqueness_of to work if a company has