Setting default format to mobile for resources

I am trying to set routes starting with /m to :format => “mobile” but am
stumbling when it comes to resources.

Has anyone accomplished something similar?