有没有办法从 Controller 检查当前页面?我试过了
current_page?
但这会返回错误:
undefined method 'current_page?'
最佳答案
在 Controller 操作和 View 中,可以使用以下帮助程序:
controller_name
action_name
你可以从它的名字中猜出它们的作用。
关于ruby-on-rails - 从 Rails 中的 Controller 检查当前页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38540463/