Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4566

Problem with the classify method from active support

From Gregory Ma <g.marcilhacy@gmail.com>
Newsgroups comp.lang.ruby
Subject Problem with the classify method from active support
Date 2011-05-15 09:35 -0500
Organization Service de news de lacave.net
Message-ID <ae14b0c42fc1ab56ad2032593d980c96@ruby-forum.com> (permalink)

Show all headers | View raw


Hi,

I am create a gem and I have encounter a problem using active_support
3.x and the classify method from the Inflector module.

If i am using active_support version 2.3.x I am able to do so:
>> ActiveSupport::Inflector::classify("car")
=> Car

But in ActiveSupport 3, things have changed a little. If I am reading
correctly
the module documentation
(https://github.com/rails/rails/blob/3-0-7/activesupport/lib/active_support/inflector/inflections.rb)
it should be working like this:

>> ActiveSupport::Inflector.inflections.classify("car")
=> NoMethodError: undefined method `classify' for
#<ActiveSupport::Inflector::Inflections:0x101bb6848>

But it doesn't work... I really don't understand why I get the
NoMethodError as the method exists in the documentation and when I
autocomplete the inflections instance I have the classify method.

ps: i am not using Rails or the Rails Console

Does someone has any idea where this could come from?
GReg

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Problem with the classify method from active support Gregory Ma <g.marcilhacy@gmail.com> - 2011-05-15 09:35 -0500
  Re: Problem with the classify method from active support Xavier Noria <fxn@hashref.com> - 2011-05-15 10:57 -0500
  Re: Problem with the classify method from active support Gregory Ma <g.marcilhacy@gmail.com> - 2011-05-15 11:47 -0500
  Re: Problem with the classify method from active support Gregory Ma <g.marcilhacy@gmail.com> - 2011-05-15 12:20 -0500

csiph-web