Strange rails behaviour: class methods doesnt work as expected...

Posted by Totty on Stack Overflow See other posts from Stack Overflow or by Totty
Published on 2010-04-05T21:50:03Z Indexed on 2010/04/05 21:53 UTC
Read the original article Hit count: 150

Filed under:

In Profile model class

def add_friendship_request(friend_id)
  Friendship.testing2 # doesnt work
  Profile.testing2 # work
end

def self.testing2
  'ss'
end

in my Friendship model class

def self.testing2
  'ss'
end

I got this error:

undefined method `testing2' for #<Class:0x58eea7c>

© Stack Overflow or respective owner

Related posts about rails