#9 楼 @zhangyuan 应该不是,没有报错啊
class Address < ActiveRecord::Base
belongs_to :user
validates_presence_of :province, :city, :area, :address, :phone
attr_accessor :province, :city, :area, :address, :phone
end
<form accept-charset="UTF-8" action="/addresses/1" class="simple_form edit_address" id="edit_address_1" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="_method" type="hidden" value="put" /><input name="authenticity_token" type="hidden" value="SHKjkV+LcF5xxe/ZZN/FE0CRUsC5jJNkPc0iplyacoU=" /></div>
<div class="inputs">
<div class="input string required"><label class="string required control-label" for="address_province"><abbr title="required">*</abbr> 省份</label><input class="string required" id="address_province" name="address[province]" size="50" type="text" value="dd" /></div>
<div class="input string required"><label class="string required control-label" for="address_city"><abbr title="required">*</abbr> 市</label><input class="string required" id="address_city" name="address[city]" size="50" type="text" value="dd" /></div>
<div class="input string required"><label class="string required control-label" for="address_area"><abbr title="required">*</abbr> 区</label><input class="string required" id="address_area" name="address[area]" size="50" type="text" value="dd" /></div>
<div class="input string required"><label class="string required control-label" for="address_address"><abbr title="required">*</abbr> 地址</label><input class="string required" id="address_address" name="address[address]" size="50" type="text" value="dd" /></div>
<div class="input tel required"><label class="tel required control-label" for="address_phone"><abbr title="required">*</abbr> 电话</label><input class="string tel required" id="address_phone" name="address[phone]" size="50" type="tel" value="" /></div>
</div>
<div class="actions">
<input class="btn" name="commit" type="submit" value="更新" />
</div>
</form>
没有错吧?
Started POST "/admins/sign_in" for 127.0.0.1 at 2012-02-08 13:33:26 +0800
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"KfbBHvHlAIa+EdRh6A83ei5IORfAnr0Jv6vsYH5oOXk=", "admin"=>{"email"=>"xiao", "password"=>"[FILTERED]"}}
Admin Load (0.3ms) SELECT `admins`.* FROM `admins` WHERE `admins`.`email` = 'xiao' LIMIT 1
Completed 401 Unauthorized in 1ms
这个问题怎么解决的啊?我也是这样啊
@nouse 硬件这部分现在不好改动。会提的,现在最重要的是改架构
不错啊,是个好东西啊