[rspec-users] [rails] An authorization question

James Byrne lists at ruby-forum.com
Mon Mar 2 14:37:34 EST 2009

Mark Wilden wrote:

> Actually, it's the other way around.
> http://www.pragprog.com/articles/tell-dont-ask

I have read this article and it leaves me rather more confused than not. 
I gather that I am missing something fundamental.  Consider that when I 
write x.to_s I am telling the object what to give back.  But then what 
am I doing when I write x.exists? or x.is_a?(y) or 
sam.authorized?(controller_or_model, action)?

Is this a semantic confusion on my part?  Should I consider that what I 
do with x.exists? is tell the object to answer a question?

Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list