Add missing method for Rails destroy command. Fixes #12141.

Earlier commit f1f249d83615faab1a030c2303c0026a5b0b2ff8 moved Rails commands into
class but missed to add 'destroy' method. This commit adds missing 'destroy'
method.