12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/stationed/generators/plugins/responders.rb', line 12
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
" self.responder = ApplicationResponder\n respond_to :html\n\n RUBY\n end\n\n application do\n <<-RUBY\n# Enable auto-loading from ./lib\n config.autoload_paths << Rails.root.join('lib')\n RUBY\n end\n super\nend\n"
|