2016-09-27 45 views

回答

4
s = Invoice 
s.name.pluralize + 'Controller' 
=> "InvoicesController" 

为了让控制器类本身...

"InvoicesController".constantize 
=> InvoicesController