Class: Generators::GraphQLAuthorizer::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Generators::GraphQLAuthorizer::InstallGenerator
- Defined in:
- lib/generators/graphql_authorizer/install_generator.rb
Overview
Add GraphQLAuthorizer to a Rails app with ‘rails g graphql_authorizer:install`.
Setup a initializer file Rack Attack and GraphQLAuhtorizer
“‘
-
app/
-
config/
-
initializers/
-
rack_attack.rb
-
graphql_authorizer.rb
-
-
“‘
Instance Method Summary collapse
Instance Method Details
#copy_graphql_authorizer_template ⇒ Object
26 27 28 29 |
# File 'lib/generators/graphql_authorizer/install_generator.rb', line 26 def file = "graphql_authorizer.rb" template(file, "config/initializers/#{file}") end |
#copy_rack_attack_template ⇒ Object
21 22 23 24 |
# File 'lib/generators/graphql_authorizer/install_generator.rb', line 21 def copy_rack_attack_template file = "rack_attack.rb" template(file, "config/initializers/#{file}") end |