Core::User < ActiveRecord::Base end
谢谢各位了
require 'active_support/inflector' Core::User.name.underscore # => "core/user" Core::User.name.underscore.gsub('/', '_').to_sym # => :core_user
提供一种思路,还是有点繁琐
Core::User.to_s.tableize.singularize # => core/user Core::User.model_name.param_key # => core_user