Displaying 20 results from an estimated 10000 matches similar to: "Ruby Price format... (Noob)"
2006 Feb 23
3
Decimal comma instead of decimal point (i18n issue)
Hello,
What is the easiest way which enables usage of decimal comma "," instead
of decimal point (".") . I would like to force all RoR views to display
float numbers with comma instead of decimal point and also to allow
insertion of float numbers with comma in forms.
Thanks in advance,
Karel
--
Posted via http://www.ruby-forum.com/.
2006 May 31
6
Linux noob
Help. I recently switched over to linux (because windows sucks). I love
linux, but i need some windows apps to run, (like iTunes), so I
installed Wine... however, I am used tot he old windows filesystem and
not the linux one, and I can't find the .wine directory. I thought it
should be under "filesystem," right? But it's not... Can anyone tell me
where my .wine dir might be?
2006 Aug 18
4
HELP!!!! - number_to_currency in model?
Hi,
I''m trying to use number_to_currency in one of my models, but i''m
getting the
following error:
undefined method `number_to_currency'' for #<Product:0x396d680>
Obviously, my Product model can''t access number_to_currency -- is there
something I need to do to make it available?
Thanks so much for your assistance.
--
Posted via
2005 Mar 04
4
Im a noob
Im completly new to the whole PBX thing. I have a toshiba unit now and
we're moving our office in the next few months. I want to use asterisk but
would like to test it out first. Does it support a basic analog phone line
like the one in my house? Is that FXS? Are there any FAQs I should read to
learn more? Thanks for the reply!
-------------- next part --------------
An HTML attachment was
2006 Apr 22
6
nOOb question: How to use find_all with form input data
Hello,
I''m having a problem utilizing the find_all method with a value from a
form. I keep getting the following error:
Mysql::Error: #42S22Unknown column ''category_id11'' in ''where clause'':
SELECT * FROM items WHERE (category_id11)
The controller seems to be getting the correct data, but my key and
value seem to be mashed together(it''s
2008 Sep 23
3
Silly answers to silly questions for a silly Noob.
OK, I'm a noob to Wine. I've figured some stuff out with Wine and it sees everything I want it to see just fine.
OK, I understand why you don't want Wine to see your windows install, but I put all my program installs on a separate partition. Now with this in mind can I just have Wine look at my Program Files and run my apps from there, or do I have to reinstall all the apps I want
2006 Jan 24
2
Noob - port 3000 in URL''s - get rid of it?
Hi, total Noob here.
I have a rails server set up and running. I''m working my way through
the "agile" book.
I see that all of the examples show URL''s that explicitly call for port
3000. How would one go about creating a ruby app that is engaged with a
"normal" URL with no port number in it?
That is apparently the default port for webrick to start up on
2009 Jul 24
7
number_to_currency not working since 2.1.1
Back in 2.1.1 everything was sweet:
Loading development environment (Rails 2.3.3)
>> include ActionView::Helpers::NumberHelper
=> Object
>> number_to_currency(12.3)
>> "$12.30"
Then I upgraded to 2.3.2 and:
Loading development environment (Rails 2.3.3)
>> include ActionView::Helpers::NumberHelper
=> Object
>> number_to_currency(12.3)
>> 12.3
2012 Mar 02
4
Noob question - Identity argument within aggregate function?
>aggregate(z, identity, mean)
1 2 3 4 5
1.0 3.0 5.0 6.0 7.5
> aggregate(z, mean)
Error: length(time(x)) == length(by[[1]]) is not TRUE
Can someone help me understand the error above and why "identity" is
necessary to satisfy the error
--
View this message in context:
2006 Mar 03
1
number_to_currency() helper == non DRY == could be improved
Hi all,
Apologies in advance if I got this one wrong, I''m still just a
newbie ;-)
Going through the Apple ADC RoR tutorial it suddenly occurred to me
that the ''number_to_currency()'' helper method was not DRY streamlined.
Scenario::
The "number_to_currency()" methods options hash works great when I
need to dynamically display different currencies when I
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 08
2
Cannot use view helpers in RJS helpers
Any ideas why I would get an error in a RJS helper on view helpers
such as number_to_currency.
Example:
# my_template.rjs
page.help_me
# my_helper for my_controller
def help_me
number_to_currency(10)
end
I have also tired page.number_to_currency but that doesn''t work either.
Cheers,
Nicholas
2005 Jul 24
1
international version for number_to_currency ?
bryce benton wrote:
> number_to_currency(1234567890.506) => $1,234,567,890.51
BTW agile book does mention this ..
will this number_to_currency(x) be internationalized ? or i can set it
to Indonesian for example (or to any other languages rather than just
English) ?
--
Salam hangat,
<%= Arie %> | http://blog.riyari.com | Y!: riyari3
email: ariekusumaatmaja_at_riyari_dot_com
2009 Sep 24
2
Calling ActionView from uninheriting class
Hi Gurus, I have a class, specified in models cart.rb, which doesn''t
inherit from anything--it''s just a container
class Cart
...
I just discovered I can''t call number_to_currency in that class. Any
idea how to "include" it in my code? I tried
ActionView.number_to_currency without luck. I could kill a few lines
of non-DRY regexp code in cart.rb if I could
2008 Nov 27
8
YET ANOTHER world of warcraft help-a-noob
okay well i've been fighting to get wow to work the past few days...i am a complete linux noob running ubuntu 8.10(intrepid)...after many issues installing i finally got the game installed and booting up however when i get in game i deal with massive glitching and screen tearing i set all screen tear reduction options in wow and have read several possible fixes but i have insufficient
2007 Jul 04
2
[LLVMdev] Noob questions about setting up on Win32
Hello, Ted.
> (*) build LLVM itself
> (*) build programs with LLVM
>
> I have a MingW32 setup on a WinXP machine;
You can see http://wiki.llvm.org/index.php/Notes:MingW32 to get
instructions how to build LLVM on mingw32 box.
For building programs with LLVM itself you'll probably need llvm-gcc4,
which you can either compiled by yourself (tricky on mingw32) or use
prebuilt one in
2006 Apr 05
1
number_to_currency inside model
I was wondering if this is possible.
I have a model (Item) that contains products. These products have prices
that I''d like to format using number_to_currency. Rather than doing this
several times inside the view, I thought it might be nice to do it once
inside the model.
The item table has an field called regular_price which holds a currency
amount. I would like to do something
2006 May 18
6
NOOB: Second post, please help...
Folks,
I am linking from page A to page B, and back again. When I go from A -> B, the B_controller.rb runs fine, and the page renders properly. But, when I go from B -> A, the A_controller.rb doesn''t run again, so the array (@A) is nil (which causes a problem).
Should the controller run each time the page is accessed? Any ideas?
Marcus
Marcus Blankenship
Technology Services -
2007 Nov 07
4
[noob] simpletest.rb, mongrel 1.1, ruby 1.8.4, mac os x 10.3.9 hangs
Hello,
I''m trying to run the latest/greatest mongrel version:
% sudo gem install mongrel
...
Successfully installed mongrel-1.1
% gem list mongrel
mongrel (1.1)
% ruby -v
ruby 1.8.4 (2005-12-24) [powerpc-darwin7.9.0]
% uname -a
Darwin NewYork.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30
20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power
Macintosh powerpc
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,