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



13
14
15
# File 'lib/generators/wechat/install_generator.rb', line 13

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

#copy_configObject



9
10
11
# File 'lib/generators/wechat/install_generator.rb', line 9

def copy_config
  template 'config/wechat.yml'
end

#copy_wechat_controllerObject



17
18
19
# File 'lib/generators/wechat/install_generator.rb', line 17

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