app/models/concerns/the_role/api/role.rb
# source_hash will be reset to false
# except true items from new_role_hash
# all keys will become 'strings'
# look at lib/the_role/hash.rb to find definition of *underscorify_keys* method
source_hash will be reset to false
except true items from new_role_hash
all keys will become 'strings'
look at lib/the_role/hash.rb to find definition of *underscorify_keys* method
source_hash will be reset to false except true items from new_role_hash all keys will become ' strings ' look at lib / the_role / hash . rb to find definition of * underscorify_keys * method
def update_role new_role_hash
        new_role_hash = new_role_hash.try(:to_hash) || {}
        new_role = new_role_hash.underscorify_keys
        role     = to_hash.underscorify_keys.deep_reset(false)
        role.deep_merge! new_role
        update_attribute(:the_role,  _jsonable(role))
      end
def update_role new_role_hash new_role_hash = new_role_hash . try ( :to_hash ) || { } new_role = new_role_hash . underscorify_keys role = to_hash . underscorify_keys . deep_reset ( false ) role . deep_merge! new_role update_attribute ( :the_role , _jsonable ( role ) ) end
source_hash will be reset to false
except true items from new_role_hash
all keys will become 'strings'
look at lib/the_role/hash.rb to find definition of *underscorify_keys* method
source_hash will be reset to false except true items from new_role_hash all keys will become ' strings ' look at lib / the_role / hash . rb to find definition of * underscorify_keys * method
new_role_hash
<not_specific>