mirror of
https://github.com/ditkrg/schemable.git
synced 2026-01-24 15:16:40 +00:00
Uses model_name as an instance method
This commit is contained in:
parent
0da8634c76
commit
b03fcc60ca
@ -92,8 +92,8 @@ module Schemable
|
|||||||
self.class.name.gsub('Swagger::Definitions::', '').constantize
|
self.class.name.gsub('Swagger::Definitions::', '').constantize
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.model_name
|
def model_name
|
||||||
name.gsub('Swagger::Definitions::', '').pluralize.underscore.downcase
|
self.class.name.gsub('Swagger::Definitions::', '').pluralize.underscore.downcase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -246,6 +246,6 @@ module Schemable
|
|||||||
# @example
|
# @example
|
||||||
# 'users' for the User model
|
# 'users' for the User model
|
||||||
# 'citizen_applications' for the CitizenApplication model
|
# 'citizen_applications' for the CitizenApplication model
|
||||||
def self.model_name: -> String
|
def model_name: -> String
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user