我有一点检入模型:
class Customers < ActiveRecord::Base
def check_user_name(name, email)
name = Customers.where(:name => name)
email = Customers.where(:email => email)
if name && email
@answer = 'Question was send to us. Thank you.'
else
@answer = 'ERROR, no such name or email.'
end
end
end
并查看(haml 文件):
=@answer
但是页面上没有文字......空......请解释我为什么?)