Pull request #194 #258

merged 3 commits into from Mar 25, 2013


None yet

3 participants


This is just pull request #194 cleaned up enough to merge cleanly.

DouweM and others added some commits Jan 8, 2012
@DouweM DouweM Allow for nesting of singleton belong_to's.
Note that
    class ThingAController < InheritedResource::Base
        belongs_to :thing_b, :singleton => true
used to mean there was only one ThingA (so resource_path == /thing_bs/123/thing_a), while it now means there is only one ThingB (so resource_path == /thing_b/thing_as/123)

To specify there is only one ThingA, you'll need
    defaults :singleton => true
Stephen Prater (@laptop) update pr #194 to merge cleanly 3b649b8
Stephen Prater (@laptop) fix multi-level nested singletons like /object/:id/thinga/thingb 7f45509

discovered that the patch does not address the (admittedly a little bizzare) case of multiply nested singleton resources. fixed it.

@joelmoss joelmoss merged commit aa599f9 into josevalim:master Mar 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment