module ActiveGraph::Shared::PermittedAttributes

Public Instance Methods

attributes=(attributes) click to toggle source
Calls superclass method
   # File lib/active_graph/shared/permitted_attributes.rb
11 def attributes=(attributes)
12   attributes = sanitize_input_parameters(attributes)
13   super(attributes)
14 end
process_attributes(attributes) click to toggle source
Calls superclass method
  # File lib/active_graph/shared/permitted_attributes.rb
6 def process_attributes(attributes)
7   attributes = sanitize_input_parameters(attributes)
8   super(attributes)
9 end

Protected Instance Methods

hash_or_parameter?(args) click to toggle source

Check if an argument is a string or an ActionController::Parameters

   # File lib/active_graph/shared/permitted_attributes.rb
19 def hash_or_parameter?(args)
20   args.is_a?(Hash) || args.respond_to?(:to_unsafe_h)
21 end
sanitize_input_parameters(attributes) click to toggle source
   # File lib/active_graph/shared/permitted_attributes.rb
23 def sanitize_input_parameters(attributes)
24   attributes = sanitize_for_mass_assignment(attributes)
25   attributes.respond_to?(:symbolize_keys) ? attributes.symbolize_keys : attributes
26 end