我有
class User < ActiveRecord::Base
attr_accessible :email
validates :email,
presence: true
serialize :data, ActiveRecord::Coders::Hstore
end
和
<%= simple_form_for User.new do |f| %>
<%= f.input :email %>
<%= f.input :first_name %>
<%= f.input :zipcode %>
<%= f.button :submit, 'Sign up' %>
<% end %>
为什么当我想Sign up
我得到一个错误:
undefined method `zipcode' for #<User:0x007fd397631650>