Class: Customs::ControllerResource
- Inherits:
-
CanCan::ControllerResource
- Object
- CanCan::ControllerResource
- Customs::ControllerResource
- Defined in:
- lib/customs/control_traffic.rb
Overview
Override CanCan::ControllerResource
Instance Method Summary collapse
- #build_resource ⇒ Object
-
#initialize(*args) ⇒ ControllerResource
constructor
A new instance of ControllerResource.
Constructor Details
#initialize(*args) ⇒ ControllerResource
Returns a new instance of ControllerResource.
8 9 10 11 12 |
# File 'lib/customs/control_traffic.rb', line 8 def initialize *args super @controller.resource_name = instance_name @controller.resource_class = resource_class end |
Instance Method Details
#build_resource ⇒ Object
14 15 16 17 |
# File 'lib/customs/control_traffic.rb', line 14 def build_resource resource = resource_base.new assign_attributes(resource) end |