Class: Raif::Generators::ModelToolGenerator
- Inherits:
-
BaseGenerator
- Object
- Rails::Generators::NamedBase
- BaseGenerator
- Raif::Generators::ModelToolGenerator
- Defined in:
- lib/generators/raif/model_tool/model_tool_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_model_tool_file ⇒ Object
12 13 14 15 |
# File 'lib/generators/raif/model_tool/model_tool_generator.rb', line 12 def create_model_tool_file template "model_tool.rb.tt", File.join("app/models/raif/model_tools", class_path, "#{file_name}.rb") template "model_tool_invocation_partial.html.erb.tt", File.join("app/views/raif/model_tool_invocations", class_path, "_#{file_name}.html.erb") end |
#success_message ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/raif/model_tool/model_tool_generator.rb', line 17 def say_status :success, "Model tool created successfully", :green say "\nYou can now implement your model tool in:" say " app/models/raif/model_tools/#{file_name}.rb" end |