Class: Chatroom::Generators::ChatroomGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Chatroom::Generators::ChatroomGenerator
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/chatroom/chatroom_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_chatroom_routes ⇒ Object
18 19 20 21 22 23 |
# File 'lib/generators/chatroom/chatroom_generator.rb', line 18 def add_chatroom_routes chatroom_route = "resources :\#{plural_name}, module: 'chatroom'\n ROUTE\n route chatroom_route\nend\n" |
#setup_private_pub ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/generators/chatroom/chatroom_generator.rb', line 25 def setup_private_pub gem 'private_pub', '1.0.3' gem 'thin', '1.5.1' generate 'private_pub:install' inject_into_file 'app/assets/javascripts/application.js', before: '//= require_tree .' do "//= require private_pub\n RUBY\n end\nend\n" |