apohllo/string_pl — Issue #4: capitalize w rails 3.2.1
Author: todhunter
Created: 2012-02-27 07:42:25+00:00
State: open

W rails 3.2.1 pojawia się błąd
irb(main):008:0* "Abc".camelize
NoMethodError: undefined method `upcase' for nil:NilClass
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/string_case_pl-0.1.1/lib/string_case_pl.rb:59:in `capitalize'
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:57:in `block in camelize'
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:57:in `sub'
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/inflector/methods.rb:57:in `camelize'
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/core_ext/string/inflections.rb:80:in `camelize'
from (irb):8
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
from /ror/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:41:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'

natomiast poniższe wywołanie działa poprawnie
irb(main):009:0> "abc".camelize
=> "Abc"