首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >缺省路由中Pakyow演示消息应用程序演示程序出现错误

缺省路由中Pakyow演示消息应用程序演示程序出现错误
EN

Stack Overflow用户
提问于 2015-05-17 21:44:36
回答 1查看 30关注 0票数 0

在您的博客文章:http://pakyow.com/blog/2015/03/24/ui-intro中,我跟踪并收到了一个错误,当为视图配置默认路由时,使用一个空的绑定集:form。view.partial(:form).scope[:message].bind({})

当刷新浏览器时,它在下面给了我一个错误。不确定如何解决此问题,也不确定需要检查哪些依赖项。

服务器错误:

代码语言:javascript
复制
 The error originated on line 104 of 'C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-presenter-0.9.1/pakyow-presenter/lib/presenter/view.rb' and generated the following stack trace:

 wrong number of arguments (0 for 1)

 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-presenter-0.9.1/pakyow-presenter/lib/presenter/view.rb:104:in `scope'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-presenter-0.9.1/pakyow-presenter/lib/presenter/view_context.rb:44:in `method_missing'
 C:/Users/Anna/Documents/wallyou/app/lib/routes.rb:7:in `block (2 levels) in <top (required)>'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `instance_exec'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `block in call_fns'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `each'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:102:in `call_fns'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:140:in `block in trampoline'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:139:in `catch'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:139:in `trampoline'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/router.rb:46:in `perform'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:245:in `block in process'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:242:in `catch'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:242:in `process'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/app.rb:223:in `call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/reloader.rb:10:in `call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/logger.rb:118:in `block in call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/logger.rb:129:in `time'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/logger.rb:116:in `call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/pakyow-core-0.9.1/pakyow-core/lib/core/middleware/static.rb:20:in `call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.6.1/lib/rack/methodoverride.rb:22:in `call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.6.1/lib/rack/builder.rb:153:in `call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/server.rb:507:in `handle_request'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/server.rb:375:in `process_client'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/server.rb:262:in `block in run'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/thread_pool.rb:104:in `call'
 C:/Ruby200/lib/ruby/gems/2.0.0/gems/puma-2.11.2/lib/puma/thread_pool.rb:104:in `block in spawn_thread'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-05-18 16:29:02

scope应该是一个函数调用,如下所示:

代码语言:javascript
复制
view.partial(:form).scope(:message).bind({})

按照您的方式,message被包装在方括号中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30292473

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档