Search code examples
ruby-on-railsrubygemsruby-on-rails-plugins

History of rails script/generate commands


Is there a plugin/gem to log/record the history of rails script/generate commands?


Solution

  • I added code to script/generate and that does the trick.

    CMD = "#{$0} #{ARGV.join(' ')}\n"
    File.open(File.expand_path('../../log/generate.log',
             __FILE__), 'a') {|f| f.write(CMD) }