Answer the question
In order to leave comments, you need to log in
Is it legal to initialize a class object variable in the initialize method?
Can it be done like this:
def initialize
super
@variable = Catalog.all
end
Answer the question
In order to leave comments, you need to log in
Why not just
class Blah
@@variable = Catalog.all
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question