After a my previous question, an answer (@Andy H) said that the related problem was the order of statements. So, in general, is it “correct” / “right” to have “before-after statement dependencies”? That is, for example, if I have the following working code
class Article < ActiveRecord::Base
acts_as_list ...
include MyModule
end
and the following code does not work
class Article < ActiveRecord::Base
include MyModule
acts_as_list ...
end
Is there some “bad” reason to do not continue the implementation of the class? That is, in general, is that a good idea to make statements to depend on the order of other statements?
I think this is not a question of “good” vs “bad”.
It just happens to be the case that code gets executed from top down.
So if you have some code in
statement_athat relies on behaviour added bystatement_bthen puttingstatement_bbeforestatement_ais the only solution…