/usr/lib/ruby/vendor_ruby/action_controller/accessible_params_wrapper.rb is in ruby-protected-attributes 1.1.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | require 'active_support/concern'
require 'action_controller'
require 'action_controller/metal/params_wrapper'
module ActionController
module ParamsWrapper
class Options # :nodoc:
undef :include
def include
return super if @include_set
m = model
synchronize do
return super if @include_set
@include_set = true
unless super || exclude
if m.respond_to?(:accessible_attributes) && m.accessible_attributes(:default).present?
self.include = m.accessible_attributes(:default).to_a
elsif m.respond_to?(:attribute_names) && m.attribute_names.any?
self.include = m.attribute_names
end
end
end
end
end
end
end
|