Changeset [2e35fe18ffcb808b5cd64dd544fa44e7bfa55ca8] by Lewis Marshall
January 23rd, 2014 @ 02:39 PM
Fix respond_to? usage for Ruby 2.0
The path helpers are protected methods, and Ruby 2.0 changed
the
behaviour of respond_to? so that it returns false for protected
methods.
See http://tenderlovemaking.com/2012/09/07/protected-methods-and-ruby-2...
Adding true as the second argument will check both protected and
private
methods which is what we want here, given we are calling
respond_to? on
self.
https://github.com/ianwhite/resources_controller/commit/2e35fe18ffc...
Committed by Lewis Marshall
- M lib/resources_controller/named_route_helper.rb
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.