Tuesday, 10 September 2013

While Using UJS in Rails 4, its throwing error undefined local variable or method `init_changed_attributes'

While Using UJS in Rails 4, its throwing error undefined local variable or
method `init_changed_attributes'

I am learning to implment UJS with Rails. And my rails Version is 4.0, I
guess thats troubling me now.
undefined local variable or method `init_changed_attributes' for
#<Post:0x3373488>
Extracted source (around line #6):
4 def load
5 @posts = Post.all
6 @post = Post.new
7 end
8 def new
9 end
While Running Migration for Post, Post got created, but encountered
Similar error in CMD prompt:
rake aborted!
undefined local variable or method `init_changed_attributes' for
#<ActiveRecord::SchemaMigratio
n version: nil>

No comments:

Post a Comment