0

I just upgraded my application from Rails 3.1 to 3.2 and I am trying to use the new ActiveRecord:Store module with a PostgreSQL database.

I created my table:

create_table :cupcakes do |t|
  t.string :name
  t.text :recipe
  t.timestamps
end

and my model looks like:

class Cupcake < ActiveRecord::Base
  store :recipe
end

But when I try to construct a new object:

cupcake = Cupcake.new

I get the following error:

NoMethodError: undefined method `store' for #<Class:...>
4

1 回答 1

0

我在没有运行迁移时遇到了这个错误。但是,迁移只是添加我用于存储的列,而不是整个表。

于 2012-12-20T01:42:53.290 回答