控制器
class CourseSurveysController < ResourcesBaseController end
controller_name # "course_surveys"
controller_name.singularize # "course_survey"
controller_name.singularize.classify # "CourseSurvey"
'Module'.constantize # => Module(没"",不是字符串)
'Test::Unit'.constantize # => Test::Unit(没"",不是字符串)
class Person < ActiveModel::Model
end Person.model_name # => Person
Person.model_name.class # => ActiveModel::Name
Person.model_name.singular # => "person"
Person.model_name.plural # => "people"