[Rails] Re: Re: Re: UTF-8 String.strip bug

2010-12-15 Thread Bob Mundane
Colin Law wrote in post #968534: > On 15 December 2010 11:09, Bob Mundane wrote: >> of Ruby. I really don't understand why it goes wrong for me. May be a >> bug in the REE code. > > Have you seen Fred's reply back in your original thread? > > Colin Yes I di

[Rails] Re: Re: UTF-8 String.strip bug

2010-12-15 Thread Bob Mundane
Colin Law wrote in post #968503: > > Is this in reply to my response? You have not quoted anything and > have changed the subject line so gmail has not linked up the thread. > I'm posting throught ruby-forum, so may be something got mixed up during the process ? So, in your case String.strip()

[Rails] Re: UTF-8 String.strip bug

2010-12-14 Thread Bob Mundane
I don't see the 'é' in your snippet code. Did you tried with real accentuated chars ? I'm using Ruby enterprise edition 1.8.x - I didn't thought about a possible bug in Ruby itself. I might try a more recent 1.8 version or REE... Don't want to switch to 1.9 just for a so small (but annoying) p

[Rails] UTF-8 String.strip bug (and several over methods)

2010-12-14 Thread Bob Mundane
Hello, with Rails 3.0.3 "Café Noir ".strip => "Café noir" but "Café ".strip => "Caf\303\251" In fact, strip() doesn't works if the last printable character is accentuated. Surprisingly " écologie".strip works fine. I've tried to dig deeper in active_support multibyte source code but didn't found

[Rails] I18n.with_options bloc executed TWICE

2010-10-01 Thread Bob Mundane
Hi, to avoid putting the whole locale scope on every I18n.t call I'm trying to use a scope, as stated in the doc (http://guides.rubyonrails.org/active_support_core_extensions.html#with_options) I tried with <%= I18n.with_options :locale => :en, :scope => 'portal.visitor_menu' do |i18n|%> Try <%

[Rails] Keeping format in link_to

2009-09-21 Thread Bob Mundane
Hello, if a action/id.something is called with the link_to urls don't keep the format ? I mean the link_to calls inside the view don't maintain the .something and generate unformatted links How can I do to keep the format ? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~-

[Rails] Re: Find :include broken when upgrading to 2.2.2

2009-06-05 Thread Bob Mundane
Frederick Cheung wrote: > On Jun 4, 1:19�pm, Bob Mundane > wrote: >> You have a nil object when you didn't expect it! >> The error occurred while evaluating nil.macro >> >> Does the :include option have changed its behaviour? >> > It did change sligh

[Rails] Find :include broken when upgrading to 2.2.2

2009-06-04 Thread Bob Mundane
Hi, I'm upgrading an old 1.2 application to latest 2.2 and I got an error which is certainly due to :include @factures = Facture.find(:all, :include => [[:forfait => :vehicule] => :client], :conditions => ["MONTH(factures.date_emission) = ? AND YEAR(factures.date_emission) = ?", @mois, @annee], :

[Rails] Re: How to restart an app under Passenger

2009-03-31 Thread Bob Mundane
Avram Dorfman wrote: > Just wanted to thank you both. Don't know why I was unable to find > this answer anywhere else. Was just here : http://www.modrails.com/documentation/Users%20guide.html#_redeploying_restarting_the_ruby_on_rails_application -- Posted via http://www.ruby-forum.com/. --~--~

[Rails] Mysql Error RELEASE SAVEPOINT active_record_1

2009-03-31 Thread Bob Mundane
Hi, I'm trying to upgrade an app from 2.2.2 to 2.3.2 and I get a bunch of Mysql Errors : Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RELEASE SAVEPOINT active_record_1' at line 1: RELEASE SAVEPO

[Rails] Re: Something crazy with rake test

2009-03-13 Thread Bob Mundane
This is a bug. Described here http://rails.lighthouseapp.com/projects/8994/tickets/1878-a-generated-plugins-tests-are-not-run-by-rake-test The generated test_helper.rb file is faulty Solution is to require 'test/unit' at the top of test_helper.rb -- Posted via http://www.ruby-forum.com/. --~

[Rails] Something crazy with rake test

2009-03-13 Thread Bob Mundane
Rake plugin tests are not run anymore (rake 0.8.4 or 0.8.3) ! rails foo cd foo script/generate plugin bar cd vendor/plugins/bar rake test No test is run, no output of the usual number of assertions, number of tests... rake output is (in /usr/local/www/foo/vendor/plugins/bar) /usr/bin/ruby -I"/u

[Rails] assert_template :partial don't work

2009-03-13 Thread Bob Mundane
Hi, following the documentation at http://api.rubyonrails.org/classes/ActionController/Assertions/ResponseAssertions.html#M000543 assert_template should accept :partial options eg. assert_templace :partial => '_foo' But, here with Rails 2.2.2, I get an error TypeError: wrong argument type Hash (

[Rails] Re: How to output unescaped string to console ?

2009-02-19 Thread Bob Mundane
BTW, a simple javascript formatter could even be better - I often struggle with RJS when I need to figure out the output render :update -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[Rails] How to output unescaped string to console ?

2009-02-19 Thread Bob Mundane
Hi, whenever I display a string to the console (for debugging purpose) I get a bunch of '' 1) It's not human readable and really annoying when strings are very long 2) Sometime it prevents me to debug anything as I really don't know if my quotes or backslashes are ok I must mention tha

[Rails] What happen when a controller raises a custom exception ?

2009-02-16 Thread Bob Mundane
Hello, some controllers of mine raises security exception. environments/test.rb defines config.action_controller.consider_all_requests_local = true 1) I want to raise from a controller, and have the exception visible in test, inside assert_raise blocks but I don't. 2) I defined rescue_action_i

[Rails] Removing string's accents

2008-12-08 Thread Bob Mundane
Hi, I'm pretty sure to have seen a new method 'remove_accents' in Rails 2.2 but I can't find it again. Is it me or does this method exists for good ? Thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Where are the environments constant defined ?

2008-11-28 Thread Bob Mundane
Thanks a lot Fred ! I was totally unaware about this... -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rub

[Rails] Where are the environments constant defined ?

2008-11-28 Thread Bob Mundane
Hi, constants defined in environment.rb are application wide. But how and where are they stored ? I mean which is the class or module to which they are attached ? Thanks -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message be

[Rails] Locale, routes, tests and default locale

2008-11-20 Thread Bob Mundane
Hi, I'm stuck in a maze : routes.rb defines resources like this one map.namespace(:admin) do |admin| admin.resources :sections, :path_prefix => '/:locale/admin' end Then, in functionnal test I have to (for example) get :index, :locale => 'en' I need to provide the :locale for every test I w