Instead of
/proposals/related_proposals?related_sort_by=

It should be calling
/proposals/*:id*/related_proposals?related_sort_by=

i think.

~Pratik


On Sat, Jun 1, 2013 at 9:08 PM, pratik khadloya <tispratik@gmail.com> wrote:

> It seems to be saving, but the related proposals are failing to load after
> the creation. It seems to be submitting a wrong id "related_proposals" to
> fetch the related proposals.
>
> Started GET "/proposals/related_proposals?related_sort_by=" for 127.0.0.1
> at 2013-06-01 21:10:23 -0700
> Processing by ProposalsController#show as JSON
>   Parameters: {"related_sort_by"=>"", "id"=>"related_proposals"}
>   Proposal Load (0.2ms)  SELECT "proposals".* FROM "proposals" WHERE
> "proposals"."id" = $1 LIMIT 1  [["id", "related_proposals"]]
> Completed 404 Not Found in 1ms
>
> ActiveRecord::RecordNotFound - Couldn't find Proposal with
> id=related_proposals:
>   (gem)
> activerecord-3.2.13/lib/active_record/relation/finder_methods.rb:343:in
> `find_one'
>
>
> Also, feels like we should get our test suite passing soon as i have
> stopped looking at the failures since the test suite was broken.
>
>
> ~Pratik
>
>
> On Sat, Jun 1, 2013 at 8:55 PM, pratik khadloya <tispratik@gmail.com>wrote:
>
>> Let me look into it.
>>
>>
>> On Sat, Jun 1, 2013 at 8:37 PM, Kim Miller <notifications@github.com>wrote:
>>
>>> In app/controllers/proposals_controller.rb:
>>>
>>> > @@ -25,27 +25,7 @@ def index
>>> >
>>> >    # GET /proposals/1.json
>>> >    def show
>>> > -    records_limit = 10
>>>
>>> @tispratik <https://github.com/tispratik> were you able to save an
>>> improved proposal after these changes? That's broken now for me. Trying to
>>> figure out what's broken.
>>>
>>> —
>>> Reply to this email directly or view it on GitHub<https://github.com/railsforcharity/spokenvote/pull/211/files#r4490780>
>>> .
>>>
>>
>>
>