Reputation: 45
For example in
class C
before_filter X
...
end
Can X can somehow be specified to be a method in another (non-super) class?
I'm wondering if this is possible by just changing the argument to before_filter.
Upvotes: 0
Views: 56
Reputation: 16629
I'm not sure why you want to call a class itself in a before filter, instead you could do this
class C
before_filter :load_other_class_method
...
load_other_class_method
X.new_your_method #or loading your class
end
end
Upvotes: 1