Ruby on rails 用于查找部分内容的默认路径

Ruby on rails 用于查找部分内容的默认路径,ruby-on-rails,mailboxer,Ruby On Rails,Mailboxer,在我的app/views/conversations/index.html.erb中,我写道: <%= render @conversations %> 生成HTML: <div class="mailboxer_conversation" id="mailboxer_conversation_16"> ... </div> <div class="mailboxer_conversation" id="mailboxer_conversation_1

在我的
app/views/conversations/index.html.erb
中,我写道:

<%= render @conversations %>
生成HTML:

<div class="mailboxer_conversation" id="mailboxer_conversation_16"> ... </div>
<div class="mailboxer_conversation" id="mailboxer_conversation_17"> ... </div>
....
。。。
... 
....

也许在
对话
前面的
邮箱
也与这种情况有关?

您可以尝试提供部分的完整路径,例如

<%= render :partial => "yourfoldername/conversation", collection: @conversations %>
“yourfoldername/conversation”,集合:@conversations%>

您可以尝试提供分部的完整路径,例如

<%= render :partial => "yourfoldername/conversation", collection: @conversations %>
“yourfoldername/conversation”,集合:@conversations%>

之所以会出现这种情况,是因为在Mailboxer的更高版本中,模型的名称空间位于Mailboxer下。(例如,Mailboxer::对话,Mailboxer::消息。)


我也关注GitHub问题。

之所以会出现这种情况,是因为在Mailboxer的更高版本中,模型是在Mailboxer下命名的。(例如,Mailboxer::对话,Mailboxer::消息。)


我对GitHub问题也很感兴趣。

这是一个相当奇怪的错误。看起来有人在github上报告了这个问题-我想是你(如果不是,我会订阅这个帖子)。这是一个相当奇怪的bug。看起来有人在github上报告了这个问题-我猜是你(如果不是,我会订阅该线程)。Mike询问原因,为什么他的解决方案没有按预期工作。Mike询问原因,为什么他的解决方案没有按预期工作。