Class: Wechat::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_wechat_routeObject



11
12
13
# File 'lib/generators/wechat/install_generator.rb', line 11

def add_wechat_route
  route 'resource :wechat, only: [:show, :create]'
end

#copy_configObject



7
8
9
# File 'lib/generators/wechat/install_generator.rb', line 7

def copy_config
  template 'config/wechat.yml'
end

#copy_wechat_controllerObject



15
16
17
# File 'lib/generators/wechat/install_generator.rb', line 15

def copy_wechat_controller
  template 'app/controllers/wechats_controller.rb'
end