Class: GetSchwifty::Generators::CableGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/get_schwifty/cable_generator.rb

Overview

:nodoc

Instance Method Summary collapse

Instance Method Details

#create_cable_filesObject



10
11
12
13
14
15
16
# File 'lib/generators/get_schwifty/cable_generator.rb', line 10

def create_cable_files
  template "cables/cable.rb", File.join("app", "cables", class_path, "#{file_name}_cable.rb")

  actions.each do |action|
    template "views/cables/action.html.erb", File.join("app", "views", "cables", class_path, file_name, "_#{action}.html.erb")
  end
end


18
19
20
# File 'lib/generators/get_schwifty/cable_generator.rb', line 18

def print_readme
  readme "CABLE"
end