Skip to content

Adds several methods which help to build conditions around value presence.

Notifications You must be signed in to change notification settings

yivo/arel-is-blank

Repository files navigation

Adds several methods which help to build conditions around value presence.

Gem Version Build Status

About

Àrel::Attributes::Attribute receives several methods which help to build conditions around value presence.

Usage

# Get posts with detailed description.
t     = Post.arel_table
posts = Post.where(t[:detailed_description].is_not_blank)
# SELECT * FROM `posts` WHERE (`posts`.`detailed_description` IS NOT NULL AND `posts`.`detailed_description` <> '') 

Installing gem

Add to your Gemfile:

gem 'arel-is-blank', '~> 1.0'

Running Tests

Install bundler:

gem install bundler

Install dependencies:

cd arel-is-blank && bundle

Run tests:

cd arel-is-blank && appraisal rake test

About

Adds several methods which help to build conditions around value presence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages