Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## What are they?
- * Methods included in Rails
- * Rails monkey patches `Object` so this is available on any object
- * Not available in Ruby
- * Used to check for presence
- ```ruby
- # #present?
- nil.present? # => false
- ''.present? # => false
- 'something'.present? # => true
- # #blank?
- nil.blank? # => true
- ''.blank? # => true
- 'something'.blank? # => false
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement