1
module Test1
module Test2
def self.included(base)
# Where can I declare constant ? How ?
base.extend ClassMethods
base.class_eval do
# named scopes
end
end
end
end
class abc
include Test1::Test2
end
どこで定数を宣言できますか?どうやって ?定数内部モジュールの書き方は?
'はじまり'ではありませんが、すべてがCAPS – Tim
です。@Tim、rookieRailerは正しいです。 Ruby定数* start_with *大文字。 クラスは実際にはRubyの定数です。 – olivervbk