x = @results.empty? ? 1 : 0 

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of James Bond
Sent: Tuesday, January 13, 2009 11:42 AM
To: [email protected]
Subject: [Rails] Re: Number of entries


How can I write it simple?

if @results.empty?
x = 0
else
x = 1
end
--
Posted via http://www.ruby-forum.com/.



--~--~---------~--~----~------------~-------~--~----~
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 [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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to