Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Rockstage's Profile

GitHub User: Rockstage

Comments by

Avatar

Can I by any chance make the scroll trigger horizontal?
if (nearRightOfPage) or something similar? My I want my content to load as s but the trigger to be horizontal. Thanks.

Avatar

Thanks I was just about to post my newby mistake. :)

Added both (@user, task) since I was indexing associations in the parent object's index (aka "task")

Avatar

Routing Error, help :)

No route matches {:action=>"sort", :controller=>"objectives", :profile_name=>"Codemaster"}

routes.rb
  scope ":profile_name" do
    resources :tasks do
      resources :objectives do
        collection { post :sort }
      end
    end
  end
Terminal
sort_task_objectives POST   /:profile_name/tasks/:task_id/objectives/sort(.:format)       objectives#sort

I did everything else as stated in the video.
data-update-url="<%= sort_task_objectives_url %>"

I do have

class ObjectivesController < ApplicationController
  before_filter :authenticate_user!
  before_filter :find_user
  before_filter :find_task
  before_filter :ensure_proper_user