Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

boy-jer's Profile

GitHub User: boy-jer

Comments by

Avatar

A new-bee here. Can someone kindly explain what the 'resource' argument refers to. I am reading the code and I know what 'controller' and 'action' are referring to, but I am clueless about the 'resource' being passed as an argument stands for.

Many thanks.

A link to the code on railscast repo: http://bit.ly/TceGen
app/models/permissions/base_permission.rb

module Permissions

  class BasePermission

   def allow?(controller, action, resource = nil)
   end

   def allow_param(resources, attributes)
   end

 end

 def permit_params!(params)
 end

end