class Hash
Public Instance Methods
permit(*attributes)
click to toggle source
# File lib/core_ext/hash.rb, line 5 def permit(*attributes) slice(*attributes) end
require(key)
click to toggle source
# File lib/core_ext/hash.rb, line 9 def require(key) self[key].present? ? self[key] : raise(ActionController::ParameterMissing, key) end
to_lower_camel_case()
click to toggle source
# File lib/core_ext/hash.rb, line 13 def to_lower_camel_case deep_transform_keys do |key| key = key.to_s.include?('?') ? "is_#{key.to_s.delete('?')}" : key.to_s key.exclude?('_') ? key.to_sym : key.camelize(:lower).to_sym end end