Class: SimpleChat::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_initializerObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/simple_chat/install_generator.rb', line 5

def create_initializer
  initializer "simple_chat.rb" do
    <<~RUBY
      # Initialize SimpleChat
      SimpleChat.configure do |config|
        # Set the user model that will be used for chat members and messages
        # config.chat_user_model = 'User'

        # Set the method to get the current user in the controller
        # Defaults to :current_user (standard for Devise)
        # config.current_user_method = :current_user
      end
    RUBY
  end
end