Ruby Quicktips Logo

Ruby Quicktips

Random Ruby and Rails tips.
This blog is dedicated to deliver short, interesting and practical tidbits of the Ruby language and Ruby on Rails framework. Read more...

Your submissions are more than welcome!
Feb 22 ’10

present? is the opposite of blank?

present? is the negation of blank?:

address.present? == !address.blank? # => true

present? in the API documentation.

(via Marcin Michałowski’s and Travis’ comments)

15 notes 0 comments

  1. rubyquicktips posted this

Comments

You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.

blog comments powered by Disqus