thanks for your direction.
The question is created by one bug in my program - I wanna use the super
to in my overriding “find_by_email” functions. I found that I can
override it the first time, but afterwards, the super class method is
called instead (skipped my overriding code totally).
Now, I solved my original problem and bet that the “find_by_email”
should be method_missing call, and the Rails remember the super class
Is my estimation is correct?
In anyway, I still cannot answer the 1 time output and 18 times outputs
difference, I am after the 2nd methods indeed was triggered 18times.
BjÃ¸rn Arild MÃ¦land wrote:
@ret = super
The return is what I expected - a list of columns in User, but this
display 18 lines of “here…” in the console (the
length of “columns” of my User is 17.
What is the difference between the two super call?
These two methods should both print the line
“here…” to standard output before they return an
array of column objects. I’m not sure why you’re getting different
results. Note that the super keyword has different semantics in Ruby
than for example Java – I’d suggest consulting the Pickaxe or Ruby
for Rails if you’re confused about its behaviour.