Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Add mention that load_resource does not work in Rails 4 #970

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ If you try visiting any of the project pages at this point you will see a <tt>Ca
end

However this can get tedious. Instead CanCan provides a +load_and_authorize_resource+ method to load the <tt>@project</tt> instance in every controller action and authorize it.
Please note that +load_and_authorize_resource+ does not work with Rails 4 strong parameters, use +authorize_resource+ instead.

class ProjectsController < ApplicationController
load_and_authorize_resource
Expand Down