I seem to be stuck figuring out that my generator doesn't need an argument. So, for example, my generator code:
class MyGenerator < Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)
def generate_stylesheet
copy_file "my.css", "public/stylesheets/my.css"
end
end
But when I do rails g my, rails always asks for an extra argument. Can you show me how this does not require additional arguments?
Thank.
source
share