Sha256: f6b751a3dcdad1f33f274b611fb1a88cdac0d29d39b14e59ddd188c9a39f891b
Contents?: true
Size: 613 Bytes
Versions: 30
Compression:
Stored size: 613 Bytes
Contents
module Locomotive module Api module CanCan class ControllerResource < ::CanCan::ControllerResource def build_resource # FIXME: within the API scope, we do not have to pass directly the params # to the new instance because we use presenters instead. resource = resource_base.new resource.send("#{parent_name}=", parent_resource) if @options[:singleton] && parent_resource initial_attributes.each do |attr_name, value| resource.send("#{attr_name}=", value) end resource end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems