Method: Jets::Commands::Call::AutoloadGuesser#underscored_name
- Defined in:
- lib/jets/commands/call/autoload_guesser.rb
#underscored_name ⇒ Object
Strips the action because we dont want it to guess the class name So:
admin--pages =>
70 71 72 73 74 75 76 77 78 |
# File 'lib/jets/commands/call/autoload_guesser.rb', line 70 def underscored_name # strip action and concidentally the _controller_ string name = @provided_function_name.sub(process_type_pattern,'') # Ensure _controller or _job at the end except for simple functions unless process_type == "function" name = name.gsub('-','_') + "_#{process_type}" end name end |