On Thu, May 31, 2012 at 2:12 PM, James B. Byrne <[email protected]>wrote:

>
> > I would generate attribute query methods only for boolean attributes.
>
> I am not sure that I understand your point, but in Ruby anything that
> is neither nil nor false is true.  Thus returning the url string, if
> not nil, is the same as saying that it is true but also allows access
> to the actual data without having to send another message.
>

I think Max's point is that "post.visible?" could be read as "post is
visible?" but "post is url?" carries a different meaning.

Sam

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to