Ruby on Rails Controller action is a private method -
i getting
private method `new' called reminder:class
the application trace
app/controllers/reminders_controller.rb:27:in `new'
the new action follows
def new @reminder = @current_user.reminders.build() @title = "new reminder" respond_to |format| format.html # new.html.erb format.json { render json: @reminder } end end
the reminder model has follows
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
i don't know how method private. in advance!
update: added method model. error still occurs.
put mailer class name remindermailer not reminder. that's problem rails not able distinguish between 2 classes , identifying new method mailer class has name reminder , showing error.
Comments
Post a Comment