标签: ruby-on-rails
如果我将:id设置为Fight Force并运行
@monster_card_name = "#{params[:id]}Monster".constantize.camelize.all
我得到Fighting ForceMonster,但我想要FightingForceMonster。我该怎么做?
答案 0 :(得分:0)
您需要先删除空格。
"#{params[:id]}Monster".tr(" ","").camelize.constantize.all