ruby on rails - Extend ActiveRecord -
my first foray modules!
lib/model_extension/say_hello
module firstmodule end class activerecord::base include firstmodule end
the code in example raises error:
lib/model_extension/say_hello.rb:5:in `<top (required)>': uninitialized constant activerecord (nameerror)
so mean? need include activerecord::base before telling include modules? putting module in wrong place?
and how should include module in model?
include firstmodule
would trick, properway it? when install gem alters models, include this:
has_secure_password
how should set can include module that?
Comments
Post a Comment