我正进入(状态
private method `new' called for Reminder:Class
应用程序跟踪是
app/controllers/reminders_controller.rb:27:in `new'
新动作如下
def new
@reminder = @current_user.reminders.build()
@title = "New Reminder"
respond_to do |format|
format.html # new.html.erb
format.json { render json: @reminder }
end
end
提醒模型如下
class Reminder < ActiveRecord::Base
belongs_to :user
belongs_to :assignment
attr_accessible :datetime, :sent_at, :status, :send_time
STATUSES = ["Not Sent", "Sending", "Sent", "Canceled"]
validates_presence_of :sent_at, :status, :user_id, :assignment_id
before_save :round_tine
def round_time
self.send_time = Time.at(t.to_i/(15*60)*(15*60))
end
end
我不知道该方法如何是私有的。我在这里先向您的帮助表示感谢!
更新:向模型添加了一个方法。错误仍然出现。