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
<<-RUBY
self.responder = ApplicationResponder
respond_to :html
RUBY
end
application do
<<-RUBY
# Enable auto-loading from ./lib
config.autoload_paths << Rails.root.join('lib')
RUBY
end
super
end
|