Changeset [60b5f270ba2c22fd24e2a93c8f4468416da75374] by Tim Pope

November 20th, 2008 @ 01:32 AM

Use clone to copy class methods in 1.8.7

In Ruby 1.8.7 (but not 1.8.6 or 1.9), Object#dup does not copy an object's singleton methods. CUrrently, resources_controller exposes this difference with a duped module that lacks the included callback of its original. This can be worked around by simply invoking #clone instead, which does not suffer from this problem.

Committed by Tim Pope

  • M lib/ardes/resources_controller/include_actions.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

resources_controller is a rails plugin that eases the pain of RESTful controllers.