What does ::Base part mean in Person < ActiveRecord::Base class declaration? I’m new to ruby and from what I’ve gathered so far, Person < ActiveRecord should be used. Thank you.
What does ::Base part mean in Person < ActiveRecord::Base class declaration? I’m new to
Share
::Base is a class in module ActiveRecord. One of the things modules do is provide namespacing in Ruby. In Ruby you don’t inherit from a module but you can mix it in using the include statement.
May I suggest picking up the Pickaxe book or reading Why’s (Poignant) Guide to Ruby.