[Rails] Re: Why use send when you can call the method directly?

2011-01-28 Thread ivanpoval
The @klass variable also could == some_object.class If this is the case, then it could be a class method call, but still don't see the necessity to use #send. -- Thanks, Ivan Povalyukhin On Jan 27, 6:39 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: David Kahn wrote in post #978011: On

[Rails] Re: Why use send when you can call the method directly?

2011-01-27 Thread Marnen Laibow-Koser
William Fisk wrote in post #977984: I am reading through some code in active_record/relation/query_methods - def build_where (about line 230); and there are a couple of calls to send. Here's the first one [@klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))] and here's the

[Rails] Re: Why use send when you can call the method directly?

2011-01-27 Thread William Fisk
Ah, thanks, yes that will probably be the reason. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Re: Why use send when you can call the method directly?

2011-01-27 Thread David Kahn
On Thu, Jan 27, 2011 at 4:01 PM, William Fisk william.f...@gmail.comwrote: Ah, thanks, yes that will probably be the reason. Right... send comes in real handy in testing private methods, use it all the time -- You received this message because you are subscribed to the Google Groups Ruby