I have created a Category class:
class Category < ActiveRecord::Base
attr_accessible :name
has_many :posts
end
When I created a new object:
category = Category.new(:name => "News")
I am getting this error:
`NoMethodError: undefined method 'attr_accessible' for Category(call
'Category.connection' to establish a connection):Class ...
How can I resolve this?