Class: Apipony::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/apipony/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_initializerObject



8
9
10
# File 'lib/generators/apipony/install_generator.rb', line 8

def copy_initializer
  template 'initializer.rb', 'config/initializers/apipony.rb'
end

#mount_engineObject



12
13
14
15
16
17
# File 'lib/generators/apipony/install_generator.rb', line 12

def mount_engine
  insert_into_file "#{Rails.root}/config/routes.rb", :after => /routes.draw.do\n/ do
    %Q{  mount Apipony::Engine => '/apipony'
}
  end
end