similar to: formatting numbers with commas

Displaying 20 results from an estimated 1000 matches similar to: "formatting numbers with commas"

2009 Sep 09
5
Newbie question: undefined method 'number_with_delimiter'(probably configuration problem)
Hi all: i am using gem to insall rails 2.3.3 and using $rails myapp to generate my application, but strangely i can''t use the number_helper below is my env: export RUBY_HOME=$HOME/ruby export GEM_HOME=$HOME/gems export RUBYLIB=$RUBY_HOME/lib:$RUBY_HOME/lib/ruby:$RUBY_HOME/lib/ site_ruby/1.8 export PATH=$HOME/gems/bin:$HOME/ruby/bin: and: $ locate number_helper.rb
2006 Feb 28
4
number_to_currency UK pounds
I work in the UK and therefore most of my currency figures will be in UK pounds. I realise that to format a number to a currency format I can use: number_to_currency(amt, :unit => "?") but it would be more convenient to set ? as the default currency symbol. What is the best way to do that? Should I edit line 39 of this file:
2006 Apr 30
8
format numbers as words
Does anyone know if there is a function available which can format any entered number as words? eg: ''1234'' would be ''One Thousand Two Hundred and Thirty Four'' In the past, I would have said this is a tall order, but from what I''ve seen with playing with rails for a short time, I don''t know what to expect. :) Thanks for any help, Damien
2007 May 12
4
Multiply and format with thousands separator
I have just started with Ruby and Rails and am still greatly confuse, finding the usual tutorials not much help. What I want to do is take two numbers from my database, multiply them together and display them in a list with a comma for the thousands separator. This would be very easy to do in a spreadsheet, so I assumed it would be easy to do in Ruby on Rails but I can''t work out how. I
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 May 14
9
IBM UniVerse database adapter for ActiveRecord?
I''m facing a situation where I am going to have to integrate with a legacy database , specifically the IBM UniVerse database, which is not *quite* relational. It feels like a holdover from the dark ages of computing. Before I attempt writing an ActiveRecord adapter, I''d like to know if anyone else uses this database and if I''m the only person that needs this thing. I
2006 Mar 30
13
Trying Agile book, found problem
Pg. 57 of Agile asks you to create a scaffolding by typing in ruby script/generate scaffold Product Admin Instead of generating everything, it only gives me exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical
2006 May 06
4
Scaffold Uses Wrong Host for MySQL user
I''m following the example Depot app in Agile Web Development with Rails. The scaffold fails because it is not using the correct host for the user. Here is the error that the scaffold emits: Access denied for user ''jimmy''@''%'' to database ''depot_development'' The MySql user ''jimmy'' was created with the host of
2006 Jun 14
6
Lost Connection to MySQL
Error Message: MyMysql::Error: Lost connection to MySQL server during query: SHOW FIELDS FROM products Running Fedora 5, using available Red Hat modules and latest version of Rails. This problem just appeared. I had been enjoying going through the tutorial "Depot" when it started displaying this problem. With phpMyAdmin I am able to access the depot_development data base containing
2006 Jan 07
2
OFF-TOPIC; Can''t post to this mailing list
Hi all! I can''t post to this list from my regular gmail account. I receive fine, but whenever I send mail, no joy. Any ideas? There has to be more to life than posting via www.ruby-forum.com and reading it in gmail, then responding from ruby-forum etc. -- G. -- Posted via http://www.ruby-forum.com/.
2009 Sep 30
2
What is this view syntax? Old beast forum code...
Hey folks A long time ago, before i started working at this company, we used a Beast forum. The beast code (models, controllers and views) were all just lumped in with our app code, but when we moved to a new version (about a year and a half ago) the forum section of our site was closed off (simply by not linking to it anywhere). I''ve been tasked with resurrecting it, and the first
2006 Apr 30
16
postgresql duplicate key violates unique constraint
I have a weird problem with creating a new record when using PostgreSQL. From inside script/console ... >> entity = Entity.new >> entity.first_name = "Foo" >> entity.last_name = "bar" >> entity.save Throws an exception due to the following SQL error: duplicate key violates unique constraint. The application was working fine before and suddenly
2006 Mar 28
3
I hope this is not spamming
I do not want to get the reputation as a spammer and be hated by the ruby and rails community??! But where are the best forums for help with rails and ruby please, and which ones are the most user freindly? I have a little tech problem: I have a lap top running xp home service pack two and I have installed ruby 1.8.2 and rails 1.0.0 I also have mysql 4.1.16-nt via tcp/ip running on the laptop, so
2006 Jan 28
10
Rails scaffolding - cannot get access to MySQL
Hi, A newbie in the RoR world, I''m already more or less stuck when generating the scaffold for my first tutorial project ... When I try to generate scaffold code for my version of the ''depot'' application from the ''Agile rails ...'' book, I receive the following error: #28000Access denied for user ''bo''@''localhost''
2006 Jul 20
3
Instant Rails not finding database
Hey there I''ve got instant rails installed, and it''s phpmyadmin can find the database at the ascribed mysql port (3210) ...however, altho i have got my ''depot_development'' db in there (along with the other dbs that ship with instant rails)... the rake script from the instant rails command interface cant find ''depot_development''. Looking at
2006 Feb 28
10
Scaffold command, how and what may be wrong?
hi everyone. I am learning RoR and just recently purchase the agile wed dev on rails. i am still at the beginning of the book trying to create the scaffold for the depot_development database. Everytime i run the generate scaffold products admin, i recieve the "before building the scaffold, try to create a table for model products" etc... a few questions: 1. How does ruby know that
2006 May 22
8
flickr tag question
hey, i am using the flickr wrapper for ruby and need to access the tags of a specific photo. i got all the rest working. i must admit i am kind of new to ruby, but i tried and tried and couldn''t figure it out. among other things i want to read geotags like in my example here: http://www.flickr.com/photos/whoisstan/146634506/ i''m sure it is deadsimple and i just overlooked it.
2008 Feb 20
1
text_field_tag - different parameter name
Hi, I have one problem with validation I am creating e-shop and I have products. This view look like this: <% for product in @category.products %> <div class="produktyBox"> <%= product.title %><br /> Price: <br /> <div style="color:red; font-size:large; font-weight:bold; margin- bottom:5px"><%=
2006 Jul 20
16
Juggernaut Released - (a.k.a Armageddon)
I''ve just released Juggernaut - a plugin for ruby on rails. Check out the site: http://juggernaut.rubyforge.org I?ve also finished a demo that illustrates some of Juggernuat?s capabilities. You can sign up for an account here: http://alexmaccaw.no-ip.info:3500/login/sign_up . It might be a tad slow as it?s running from my home machine. Juggernaut for Ruby on Rails initiates a flash
2003 May 06
2
"help.start() and kde konqueror"
Hello, When I attempt to use KDE 3.03 "konqueror" for help.start() I can't get the search engine to work but otherwise help.start() is OK. How should "konqueror" be setup for this? The response to the command is below: > help.start(browser= 'konqueror') Making links in per-session dir ... If konqueror is already running, it is *not* restarted, and you must