Sha256: ff5d5f1b6d366170ed8f1450d1ab9a3a0e94b99bdf01e53a254228d4ecfc3c24

Contents?: true

Size: 323 Bytes

Versions: 6

Compression:

Stored size: 323 Bytes

Contents

# frozen_string_literal: true

Enumerable.class_eval do
  if method_defined?(:compact_blank) && !method_defined?(:select_present)
    alias_method :select_present, :compact_blank
  end

  if method_defined?(:compact_blank!) && !method_defined?(:select_present!)
    alias_method :select_present!, :compact_blank!
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-rails-extensions-1.1.1 lib/ruby-rails-extensions/extensions/select_present.rb
ruby-rails-extensions-1.1.1.pre.rc.1 lib/ruby-rails-extensions/extensions/select_present.rb
ruby-rails-extensions-0.2.0 lib/ruby-rails-extensions/extensions/select_present.rb
ruby-rails-extensions-0.2.0.pre.rc.1 lib/ruby-rails-extensions/extensions/select_present.rb
ruby-rails-extensions-1.1.0 lib/ruby-rails-extensions/extensions/select_present.rb
ruby-rails-extensions-1.1.0.pre.rc.1 lib/ruby-rails-extensions/extensions/select_present.rb