Tag: stack trace

NoMethodError的完整跟踪

这基本上是我之前问题的第2部分,因为我已经根据代码的长度创建了一个新问题。 希望我们能够在您的帮助下解决这个问题,我相信我们现在可以通过新信息找到解决方案。 编辑:感谢您的输入。 这是pt的链接。 1与实际代码: 登录function不起作用 。 PS。 请不要忘记投票这个问题。 inheritance人user.rb: # == Schema Information # # Table name: users # # id :integer not null, primary key # name :string(255) # email :string(255) # created_at :datetime not null # updated_at :datetime not null # encrypted_password :string(255) # salt :string(255) # class User true, :length => […]

ActiveRecord :: Relation(嵌套属性)的未定义方法

结果:: ActiveRecord_Relation的未定义方法`results’:0x007f9ee69ad148> Quantifieds#指数 这里的第一行是导致exception的原因。 要重述这个问题,我如何定义date_value和result_value以使其在quantieds索引中起作用? 它们来源于:_form中的结果。 我正在使用cocoon来创建嵌套属性。 整个索引 (根据第一个答复响应更新) AVERAGE () INSTANCE () <span class="glyphicon glyphicon-plus" result %> [:month, :year], class: ‘date-select’ %> 我需要更改控制器中的任何内容吗? class QuantifiedsController < ApplicationController before_action :set_quantified, only: [:show, :edit, :update, :destroy] before_action :authenticate_user!, except: [:index, :show] def index @quantifieds = Quantified.joins(:results).all @averaged_quantifieds = current_user.quantifieds.averaged @instance_quantifieds = current_user.quantifieds.instance end def show end […]

永久设置rails控制台堆栈回溯限制

rails console默认情况下使用context.back_trace_limit=16启动,只需键入context.back_trace_limit=n即可将其更改为您想要的任何内容。 问题是你必须在每次启动rails c时键入它。 我在哪里永久更改context.back_trace_limit ? 有关轨道控制台配置的更多阅读表示赞赏