similar to: format question

Displaying 20 results from an estimated 100 matches similar to: "format question"

2005 Jul 08
2
Multiple language support
Hi I am a newbie on Rails. I am trying to figure out how to implement a multiple language site. How do you deal with navigation, error messages coming from Rails etc. Anybody have practical suggestions? Tnx -- PC -- PC __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2005 Jul 04
1
Localization problems with leeding html escaped ÅÄÖ
Hi All. When translating a string to in swedish, using HTML codes for å,ä,ö i have a minor problem. Eg: (se.yaml) ui_core_over: Över All I get when calling l(''ui_core_over'') in my view is "Ouml;ver" The leeding & is missing, making the page look silly. The HTML characters works fine as long as it''s not used as the first letter in the string.
2006 May 10
1
acts_as_ferret choking
Hi all, I''ve ran into a problem with Ferret on my rails app, and I don''t really have a clue about why. When running the unit tests, I get the following error output: > Exception raised: > Class: <NoMethodError> > Message: <"You have a nil object when you didn''t expect it!\nThe > error occured while evaluating nil.version"> >
2005 Dec 19
8
Simply Ruby question: "zerofill"
Hi there- What''s the easiest/most efficient way to perform a zerofill in Ruby? i.e. Given the value ''val'', I would like to do something like: val = 43 puts val.zerofill(8) ---> "00000043" gsub? sprintf of some sort? Jake -- Posted via http://www.ruby-forum.com/.
2006 Mar 21
2
How do I get substring of utf-8 string?
I''m trying to get substring from a utf-8 encoded string. (say, first 50 characters of the string) String#[0..49] would give me the first 50 bytes not 50 characters.. I know there is jcode library, but it only let you count number of characters in utf-8 string. unicode gem doesn''t seem to help much. unicode_hacks gem seem to solve the problem, but it also seems to
2012 Feb 14
6
cannot load such file -- openssl (again)
This problem has been discussed a number of times, but none of the given solutions seems to work for me. Problem: Trying to generate the infrastructure for testing with Cucumber gives the following error ~/.../OTK-register$ rails generate cucumber:install /home/tpollak/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
2005 Mar 10
24
(Online) documentation for 1.0
With the big One-Oh on it''s way, I''m thinking we should perhaps start to work on the documentation some more. The RDoc format is perfectly fine, and does its job beautifully, but I think it doesn''t quite reflect the whizbang value that rails has, especially for newcomers. As one who has looked at the api docs almost daily for several months, I feel quite comfortable
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi, I''ve looked on api.rubyonrails.org but I''ve not found how to add to a date_select(object, method, options = {}) a class option to set the class of all the select tags. I''ve tried using "class" => "myclass" in thoose ways: <%= date_select("costo", "data", "class" => "testo" ) %> <%=
2005 Mar 10
7
Order of Processing
It seems odd to me that the layout is processesed after the view. When I set a variable inside the view it does not have an impact on the layout file. But when I set it in the controller it does. Is this the way it works or is it possible that I am doing something wrong?
2013 Nov 26
2
Lustre 1.8 client on EL 6.5?
Hello, in preparation for CentOS 6.5 I was trying to build Lustre 1.8 client on CentOS 6.4 updated with 2.6.32-431 kernel. Seems like recent changes in fs.h (/usr/src/kernels/2.6.32-431.el6.x86_64/include/linux/fs.h) is causing problems. make[5]: Entering directory `/usr/src/kernels/2.6.32-431.el6.x86_64'' cc1: warnings being treated as errors
2007 Sep 18
10
Routes
hi all, I want to move some routing tasks out of the router and into the controller. The goal is to make Merb feel less like mod_rewrite and give the user more control at the controller. The new Router is simple: it takes the path_info (not the whole request) then outputs a controller class and some parameters from the path matching. The rest of the routing would be done at the controller level.
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/.
2005 Nov 13
2
Link_to :protocol and :host?
Hello, I am trying to set the protocol and host in link_to based on the documentation. I have the following: <%= link_to "View Cart", {:controller => ''store'', :action => ''view_cart'', :protocol => ''https://'', :host => ''secure.host.com''} %> I would expect this to generate a https link to another
2019 Mar 22
1
prettyNum digits=0 not compatible with scientific notation
> On 22 Mar 2019, at 18:07 , Martin Maechler <maechler at stat.math.ethz.ch> wrote: > > gives (on Linux R 3.5.3, Fedora 28) > > d=10 d=7 d=2 d=1 d=0 > [1,] "123456" "123456" "123456" "1e+05" "%#4.0-1e" > [2,] "12345.6" "12345.6" "12346"
2006 Mar 26
4
edge and 1.8.2/1.8.4 issues
I recently upgraded to 1.8.4 to try out mongrel, and so far have been in a kind of hell where I can''t get my app working! Currently running (or trying to run): Ruby version 1.8.4 (i386-mswin32) RubyGems version 0.8.11 Rails version 1.0.0 Active Record version 1.13.2 Action Pack version 1.11.2 Action Web Service version 1.0.0 Action Mailer version 1.1.5 Active Support version
2019 Mar 22
2
prettyNum digits=0 not compatible with scientific notation
FWIW, it doesn't seem to be happening on Mac OS: > format(2^30, digits=0) [1] "1.e+09" > prettyNum(12345.6, digits=0) [1] "1.e+04" A glibc misfeature? -pd > On 22 Mar 2019, at 10:10 , Martin Maechler <maechler at stat.math.ethz.ch> wrote: > > Thank you, Robert for raising this here ! > >>>>>> Robert McGehee
2010 May 08
19
mb_chars.upcase and Ruby 1.9.2
I''m testing ruby-head through rvm but can''t get ''ação''.mb_chars.upcase == ''AÇÃO''... I get ''AçãO'' instead... This happens both for Rails 2.3.5 and Rails 3 beta 3... How can I get upcase to work correctly? Thanks in advance, Rodrigo. -- You received this message because you are subscribed to the Google Groups "Ruby
2005 Feb 09
85
Introduce yourself and your project -- Round 2
On December 14th, 2004 David Heinemeier Hansson sent this to the mailing list: I''m seeing a lot of new names on the list. Could we perhaps do a round of introductions? That would also be a great first post, if you haven''t had a chance to contribute yet. The basics should include your name, your organization, your country and city, and the project you''re
2006 Apr 29
11
Multiple actions from one form - possible?
Hello * Obviously the rhtml below does not work, but it should be apparent what I try to achieve - I would like to give the user the choice to submit a form either to action1 or action2 but I cannot figure out how?! It would be great if someone could give some assistance. Thanks a lot, Alex <%= start_form_tag :action1 => ''save'', :action2 =>
2011 Nov 16
1
hierachical code system
Hi,   I have a hierachical code system such as the example below (the printed data are easiest to read). I would like to write a function that returns an 'imputed' data frame, ie. where the the parent values are calculated as the sum of the child values. So, for instance, STAT.01.01.06  is the sum of STAT.01.01.06.01 through STAT.01.01.06.06. The code I have written uses two for loops,