Class: Gql::ModelTypeGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Gql::ModelTypeGenerator
- Includes:
- GqlGeneratorBase
- Defined in:
- lib/generators/gql/model_type_generator.rb
Instance Method Summary collapse
Instance Method Details
#type ⇒ Object
8 9 10 11 12 |
# File 'lib/generators/gql/model_type_generator.rb', line 8 def type file_name = "#{model_name.underscore}_type" @fields = map_model_types(model_name) template('model_type.rb', "app/graphql/types/#{file_name}.rb") end |