lib/stationed/generators/plugins/responders.rb in stationed-0.0.1 vs lib/stationed/generators/plugins/responders.rb in stationed-0.1.0

- old
+ new

@@ -1,9 +1,17 @@ module Stationed module Generators module Plugins module Responders + def self.prepended(base) + base.class_option :responders, + type: :boolean, + default: true, + desc: 'Add and configure Responders gem for DRY controllers' + end + def finish_template + return super unless options[:responders] gem 'responders' copy_file 'application_responder.rb', 'lib/application_responder.rb' inject_into_class 'app/controllers/application_controller.rb', 'ApplicationController' do <<-RUBY