2016-09-27 64 views

回答

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

爲了讓控制器類本身...

"InvoicesController".constantize 
=> InvoicesController