Ruby on Rails 3机架中间件中,为何未定义方法`每个`引发问题?
- 内容介绍
- 文章标签
- 相关推荐
本文共计146个文字,预计阅读时间需要1分钟。
我想在框架中打印模板的主体。下面是我的设置……
我想用机架中间件打印模板的主体.下面是我的设置……#config/initializers/response_timer.rb class ResponseTimer def initialize(app) @app = app end def call(env) status, headers, response = @app.call(env) [status, headers, response.body] end end #application.rb file config.middleware.use "ResponseTimer"
当我提出请求domainname / students /我收到以下错误.
undefined method `each' for #<String:0xd69a2e0>
请帮助.
本文共计146个文字,预计阅读时间需要1分钟。
我想在框架中打印模板的主体。下面是我的设置……
我想用机架中间件打印模板的主体.下面是我的设置……#config/initializers/response_timer.rb class ResponseTimer def initialize(app) @app = app end def call(env) status, headers, response = @app.call(env) [status, headers, response.body] end end #application.rb file config.middleware.use "ResponseTimer"
当我提出请求domainname / students /我收到以下错误.
undefined method `each' for #<String:0xd69a2e0>
请帮助.

