module Representable::Binding::Collection

generics for collection bindings.

Public Instance Methods

skipable_empty_value?(value) click to toggle source
# File lib/representable/binding.rb, line 91
def skipable_empty_value?(value)
  # TODO: this can be optimized, again.
  return true if value.nil? and not self[:render_nil] # FIXME: test this without the "and"
  return true if self[:render_empty] == false and value and value.size == 0  # TODO: change in 2.0, don't render emtpy.
end