mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-25 07:36:40 +00:00
Adds Camelize Keys Method to Definitions
This commit is contained in:
@@ -95,5 +95,9 @@ module Schemable
|
||||
def model_name
|
||||
self.class.name.gsub('Swagger::Definitions::', '').pluralize.underscore.downcase
|
||||
end
|
||||
|
||||
def camelize_keys(hash)
|
||||
hash.deep_transform_keys { |key| key.to_s.camelize(:lower).to_sym }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user