Module: Stationed::Generators::Plugins::Pundit
- Included in:
- AppGenerator
- Defined in:
- lib/stationed/generators/plugins/pundit.rb
Instance Method Summary collapse
Instance Method Details
#finish_template ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/stationed/generators/plugins/pundit.rb', line 5 def finish_template gem 'pundit' copy_file 'pundit.rb', 'spec/support/pundit.rb' copy_file 'authorization.rb', 'app/controllers/concerns/authorization.rb' inject_into_class 'app/controllers/application_controller.rb', 'ApplicationController', "\n include Authorization\n\n" super end |
#run_bundle ⇒ Object
13 14 15 16 |
# File 'lib/stationed/generators/plugins/pundit.rb', line 13 def run_bundle super generate 'pundit:install' end |