Sha256: d300855d4ddfeb62c6b1f9d3cf1281faec36825f0d962bbccf78b1ee57026c7c

Contents?: true

Size: 343 Bytes

Versions: 30

Compression:

Stored size: 343 Bytes

Contents

class Hash

  def compact
    delete_if { |k, v| v.blank? }
  end

  def cleanup
    whitelist = %w(controller action id
                   input
                   layout
                   resource resource_id resource_action
                   selected
                   back_to)
    delete_if { |k, v| !whitelist.include?(k) }
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
typus-3.1.0.rc19 lib/support/hash.rb
typus-3.1.0.rc18 lib/support/hash.rb
typus-3.0.12 lib/support/hash.rb
typus-3.1.0.rc17 lib/support/hash.rb
typus-3.1.0.rc16 lib/support/hash.rb
typus-3.1.0.rc15 lib/support/hash.rb
typus-3.1.0.rc14 lib/support/hash.rb
typus-3.0.11 lib/support/hash.rb
typus-3.1.0.rc13 lib/support/hash.rb
typus-3.1.0.rc12 lib/support/hash.rb
typus-3.0.11.rc5 lib/support/hash.rb
typus-3.1.0.rc11 lib/support/hash.rb
typus-3.1.0.rc10 lib/support/hash.rb
typus-3.0.11.rc4 lib/support/hash.rb
typus-3.1.0.rc9 lib/support/hash.rb
typus-3.0.11.rc3 lib/support/hash.rb
typus-3.1.0.rc8 lib/support/hash.rb
typus-3.1.0.rc7 lib/support/hash.rb
typus-3.1.0.rc6 lib/support/hash.rb
typus-3.1.0.rc5 lib/support/hash.rb