【发布时间】:2011-12-20 13:12:36
【问题描述】:
我正在使用 Thimothy Fisher 的“RoR Bible”来研究 Ruby on Rails。但是其中一个示例不起作用。这是代码 - http://pastebin.com/gtjLsdt0
错误是:NoMethodError in Contact#new where line #4 raise:
undefined method `merge' for "first_name":String
那是我的contact_controller。我只是重新输入示例的代码,并没有任何关于合并的文字
class ContactController < ApplicationController
def index
@contacts = Contact.find(:all);
end
def show
end
def new
@contact = Contact.new;
end
def create
end
def update
end
end
怎么了??
【问题讨论】:
标签: ruby-on-rails ruby forms textfield