diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-20 23:12:05 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-20 23:12:05 +0000 |
commit | d578196f9a5b583c167d60d0f10d7684f41aa318 (patch) | |
tree | 57601f77093382d6fe43718d13c320add23e46f5 /activesupport | |
parent | 409d56abda45ee380d6a903cbf835e7a770061d8 (diff) | |
download | rails-d578196f9a5b583c167d60d0f10d7684f41aa318.tar.gz rails-d578196f9a5b583c167d60d0f10d7684f41aa318.tar.bz2 rails-d578196f9a5b583c167d60d0f10d7684f41aa318.zip |
Added pagination support through both a controller and helper add-on #817 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/kernel.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel.rb b/activesupport/lib/active_support/core_ext/kernel.rb new file mode 100644 index 0000000000..fe6f725bc0 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/kernel.rb @@ -0,0 +1,17 @@ +module Kernel + # A Ruby-ized realization of the K combinator, courtesy of Mikael Brockman. + # + # def foo + # returning values = [] do + # values << 'bar' + # values << 'baz' + # end + # end + # + # foo # => ['bar', 'baz'] + # + def returning(value) #:nodoc: + yield + value + end +end |