I''m trying to class array to another array. However Glove.class_name become ''Glofe''. Somebody can tell me why? My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista.
Hi Masuda, On Thu, 2009-08-06 at 10:12 +0900, Masuda wrote:> I''m trying to class array to another array. > However Glove.class_name become ''Glofe''. > Somebody can tell me why? > > My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista.My first guess would be pluralization. HTH, Bill
class_name isn''t a real method, try Glove.class.name instead. - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Aug 5, 2009 at 10:12 PM, Masuda<msd.456-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m trying to class array to another array. > However Glove.class_name become ''Glofe''. > Somebody can tell me why? > > My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista. > > > >
Hi Bill. Thanks for your reply. I guessed so too, but plural form of glove is ''gloves'' isn''t it? In addition, I found Mustache.class_name becomes ''Mustach'' (lack of last ''e''). I think it''s odd. 2009/8/6 bill walton <bwalton.im-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > Hi Masuda, > > On Thu, 2009-08-06 at 10:12 +0900, Masuda wrote: >> I''m trying to class array to another array. >> However Glove.class_name become ''Glofe''. >> Somebody can tell me why? >> >> My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista. > > My first guess would be pluralization. > > HTH, > Bill > > >
Thanks for youre reply but ... Glove.class.name returns "Class", not a class name. 2009/8/6 Maurício Linhares <linhares.mauricio-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > class_name isn''t a real method, try Glove.class.name instead. > > - > Maurício Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr > > > > On Wed, Aug 5, 2009 at 10:12 PM, Masuda<msd.456-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> I''m trying to class array to another array. >> However Glove.class_name become ''Glofe''. >> Somebody can tell me why? >> >> My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista. >> >> > >> > > > >
Ops, i meant Glove.name - Maurício Linhares http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr On Wed, Aug 5, 2009 at 11:06 PM, Masuda<msd.456-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Thanks for youre reply but ... > Glove.class.name returns "Class", not a class name. > > 2009/8/6 Maurício Linhares <linhares.mauricio-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >> >> class_name isn''t a real method, try Glove.class.name instead. >> >> - >> Maurício Linhares >> http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr >> >> >> >> On Wed, Aug 5, 2009 at 10:12 PM, Masuda<msd.456-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>> I''m trying to class array to another array. >>> However Glove.class_name become ''Glofe''. >>> Somebody can tell me why? >>> >>> My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista. >>> >>> > >>> >> >> > >> > > > >
Thanks for your help. It works fine !! 2009/8/6 Maurício Linhares <linhares.mauricio-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > Ops, i meant Glove.name > > - > Maurício Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr > > > > On Wed, Aug 5, 2009 at 11:06 PM, Masuda<msd.456-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> Thanks for youre reply but ... >> Glove.class.name returns "Class", not a class name. >> >> 2009/8/6 Maurício Linhares <linhares.mauricio-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: >>> >>> class_name isn''t a real method, try Glove.class.name instead. >>> >>> - >>> Maurício Linhares >>> http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr >>> >>> >>> >>> On Wed, Aug 5, 2009 at 10:12 PM, Masuda<msd.456-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> >>>> I''m trying to class array to another array. >>>> However Glove.class_name become ''Glofe''. >>>> Somebody can tell me why? >>>> >>>> My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista. >>>> >>>> > >>>> >>> >>> > >>> >> >> > >> > > > >
Hi Masuda, On Thu, 2009-08-06 at 10:55 +0900, Masuda wrote:> Hi Bill. > > Thanks for your reply.You''re welcome. Sorry I couldn''t be more help.> I guessed so too, but plural form of glove is ''gloves'' isn''t it? > In addition, I found Mustache.class_name becomes ''Mustach'' (lack of last ''e'').> I think it''s odd.It is odd. And yes, the correct plural (in American English) of glove is gloves. But as you discovered, Rails pluralization is sometimes a bit ''off''. That''s why I take a look there first when I get weird results like yours. It''s just a quick way to rule out something simple. Glad you got the help you needed. Best regards, Bill> > 2009/8/6 bill walton <bwalton.im-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > Hi Masuda, > > > > On Thu, 2009-08-06 at 10:12 +0900, Masuda wrote: > >> I''m trying to class array to another array. > >> However Glove.class_name become ''Glofe''. > >> Somebody can tell me why? > >> > >> My environment is ruby 1.8.6 Rails 2.2.2 on Windows Vista. > > > > My first guess would be pluralization. > > > > HTH, > > Bill > > > > > > > > >