ryanb/cancan — pull request #757 by flyerhzm (2012-10-07 03:20:25+00:00)
Title: Allow override resource params

Allow override resource_params in controller so that it makes cancan easily work with strong_parameters.

Here is an example how I use cancan with strong_parameters.

class PostsController < ApplicationController
load_and_authorize_resource
# new, create, edit, update actions
protected
def resource_params
params.require(:post).permit(:title, :description, :tag_list, post_body_attributes: [:body]) if params[:post]
end
end