diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-12 16:43:48 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-12 16:43:48 -0700 |
commit | 1b8f72746b38ce1e08b5fab48f3251eb09f2cba0 (patch) | |
tree | 3782ef3e88474bb6d79ba3e25b08b235fca78040 /lib/active_relation/extensions | |
parent | 6de1f350ce117129e46353f12f90a138ca3d3ead (diff) | |
download | rails-1b8f72746b38ce1e08b5fab48f3251eb09f2cba0.tar.gz rails-1b8f72746b38ce1e08b5fab48f3251eb09f2cba0.tar.bz2 rails-1b8f72746b38ce1e08b5fab48f3251eb09f2cba0.zip |
- removed #qualify and #descend helper
- qualify seems no longer neccessary since everything is fully qualified
- finished pending specs
Diffstat (limited to 'lib/active_relation/extensions')
-rw-r--r-- | lib/active_relation/extensions/hash.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/active_relation/extensions/hash.rb b/lib/active_relation/extensions/hash.rb index a33ace5738..7472b5aa73 100644 --- a/lib/active_relation/extensions/hash.rb +++ b/lib/active_relation/extensions/hash.rb @@ -1,11 +1,7 @@ class Hash def bind(relation) - descend { |x| x.bind(relation) } - end - - def descend(&block) - inject({}) do |descendent, (key, value)| - descendent.merge(yield(key) => yield(value)) + inject({}) do |bound, (key, value)| + bound.merge(key.bind(relation) => value.bind(relation)) end end end
\ No newline at end of file |