Class: CmGraphql::Generators::AddGraphqlGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CmGraphql::Generators::AddGraphqlGenerator
- Defined in:
- lib/generators/cm_graphql/add_graphql_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_graphql ⇒ Object
8 9 10 11 12 |
# File 'lib/generators/cm_graphql/add_graphql_generator.rb', line 8 def add_graphql generate 'graphql:install' template 'graphql_schema.rb', "app/graphql/#{Rails.application.class.module_parent_name.underscore}_schema.rb" gsub_file 'app/controllers/graphql_controller.rb', '# protect_from_forgery with: :null_session', 'protect_from_forgery with: :null_session' end |