rails/rails — Issue #5048: Rails command accessor (feature request)
Author: andredurao
Created: 2012-02-15 12:19:41+00:00
State: open

Wouldn't Rails provide a way to get which command is running (server, console, generate, ...)?

Writing a gem that hooks the rails initialization I found that I can't get ARGV rails command anymore.

A constant on railties/lib/rails/commands.rb helped me to get the command on the hook,
but it seems that an accessor should be the right way to do this...