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


Groups > comp.lang.ruby > #4574

Re: Problem with the classify method from active support

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

Show all headers | View raw


Thanks again I have been able to fix this but I am encountering a new
issue.

If works fine with ActiveSupport 2.3.x mais but it doesn't work 3.0.x
Here is the line:

>> board = :ruby_forum
>> klass = board.respond_to?(:classify) ? board.classify :
ActiveSupport::Inflector::classify(board)
>> NoMethodError: undefined method `classify' for ActiveSupport::Inflector:Module

This line doesn't work in version 3 because it evaluates the last
condition, and the classify method doesn't exist in version 3.

What trick could I use?

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

Back to comp.lang.ruby | Previous | NextPrevious 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