I have incorporated CanCan (another mega thanks, btw!), but this link doesn't work. The user not set when it is passed this way, so cancan authorization fails. I can get around it by using a form and submit instead of the link... but i feel like i'm missing something???
words cannot explain how useful I have found this episode!
I've restructured my first rails site to work this way.
I hit a snag that's bugging me.
For example, in this file:
https://github.com/railscasts/136-jquery-ajax-revised/blob/master/checklist-after/app/views/tasks/_task.html.erb
The delete action is fired with this link:
<%= link_to "(remove)", task, method: :delete, data: {confirm: "Are you sure?"}, remote: true %>
I have incorporated CanCan (another mega thanks, btw!), but this link doesn't work. The user not set when it is passed this way, so cancan authorization fails. I can get around it by using a form and submit instead of the link... but i feel like i'm missing something???
I posted my question here, but thought I'd go straight to the masters for this one...
http://stackoverflow.com/questions/15815522/ruby-on-rails-cancan-user-is-nil-during-destroy-action