【发布时间】:2012-05-15 07:29:44
【问题描述】:
我有以下哈希:
EMAIL_PWD_HASH = Hash.new
EMAIL_PWD_HASH[ "email" ] = { "label" => EMAIL_STR, "type" => "email_field" }
EMAIL_PWD_HASH[ "password" ] = { "label" => PWD_STR, "type" => "password_field" }
以及以下哈希:
NEW_USER_HASH = Hash.new
NEW_USER_HASH[ "first" ] = { "label" => FIRST_STR, "type" => "text_field" }
NEW_USER_HASH[ "last" ] = { "label" => LAST_STR, "type" => "text_field" }
NEW_USER_HASH[ "title" ] = { "label" => TITLE_STR, "type" => "text_field" }
NEW_USER_HASH[ "bio" ] = { "label" => BIO_STR, "type" => "text_field" }
我想在最后一个和 bio 之前添加电子邮件和密码到 NEW_USER_HASH。添加 EMAIL_PWD_HASH 的语法是什么(顺序很重要)?
【问题讨论】:
-
你想做什么,顺序很重要?